https://github.com/sepppenner/gitlabautopullmirroring
GitlabAutoPullMirroring is a script to update all Gitlab repositories to be mirrored from Github (Pull from Github, push is currently not possible). Useful for all that are #movingtogitlab. The script was written and tested in Python 3.
https://github.com/sepppenner/gitlabautopullmirroring
Last synced: 10 months ago
JSON representation
GitlabAutoPullMirroring is a script to update all Gitlab repositories to be mirrored from Github (Pull from Github, push is currently not possible). Useful for all that are #movingtogitlab. The script was written and tested in Python 3.
- Host: GitHub
- URL: https://github.com/sepppenner/gitlabautopullmirroring
- Owner: SeppPenner
- License: mit
- Created: 2018-09-19T13:55:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T07:03:00.000Z (about 2 years ago)
- Last Synced: 2025-04-22T13:44:48.757Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: License.txt
Awesome Lists containing this project
README
GitlabAutoPullMirroring
====================================
GitlabAutoPullMirroring is a script to update all Gitlab repositories to be mirrored from Github (Pull from Github, push is currently not possible: https://gitlab.com/gitlab-org/gitlab-ee/issues/7599).
Useful for all that are [#movingtogitlab](https://twitter.com/hashtag/movingtogitlab?lang=en). The script was written and tested in Python 3.
[](https://ci.appveyor.com/project/SeppPenner/gitlabautopullmirroring)
[](https://github.com/SeppPenner/GitlabAutoPullMirroring/issues)
[](https://github.com/SeppPenner/GitlabAutoPullMirroring/network)
[](https://github.com/SeppPenner/GitlabAutoPullMirroring/stargazers)
[](https://raw.githubusercontent.com/SeppPenner/GitlabAutoPullMirroring/master/License.txt)
[](https://snyk.io/test/github/SeppPenner/GitlabAutoPullMirroring)
# Steps to use this script:
1. Migrate your projects from github to gitlab: https://docs.gitlab.com/ee/user/project/import/github.html
2. Wait until finished
3. Generate a personal access token on gitlab: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
4. Get your user id from https://gitlab.com/profile or via
 and

4. Fill in your user name, user id and the generated access token in the following lines in the
[GitlabAutoPullMirroring.py](https://github.com/SeppPenner/GitlabAutoPullMirroring/blob/master/GitlabAutoPullMirroring.py) file:
```python
userName = "YourUserName"
userId = 1234567
token = "1234567890"
```
5. Install all required pip package dependencies with:
```python
pip install -r requirements.txt
```
6. Run the project using:
```bash
python GitlabAutoPullMirroring.py
```
or
```bash
./run.sh
```
# For more information see:
* https://docs.gitlab.com/ee/api/projects.html#start-the-pull-mirroring-process-for-a-project
* https://docs.gitlab.com/ee/api/projects.html#edit-project
* https://stackoverflow.com/questions/52428297/how-can-i-tell-gitlab-to-mirror-my-github-repositories-over-the-api/52443442#52443442
* https://stackoverflow.com/questions/52554811/how-can-i-change-the-mirroring-settings-in-gitlab-over-the-api/52554997#52554997
* https://gitlab.com/gitlab-org/gitlab-ee/issues/7599
Change history
--------------
See the [Changelog](https://github.com/SeppPenner/GitlabAutoPullMirroring/blob/master/Changelog.md).