Mirroring from GitLab to GitHub

GitLab has now an option to do this from the UI, go to the Settings->Repository of your repo:

https://gitlab.com/yourUserNameInGitLab/yourRepoName/settings/repository

Then find the option “Mirror a repository” and click on expand. What you want to do is choose the “Push” mirror direction and fill this URL:

https://yourUserNameInGitHub@github.com/yourUserNameInGitHub/yourRepoName.git

In the password field, you have to use a Personal Access Token (as GitHub has deprecated password access now), which you can generate here: https://github.com/settings/tokens (don’t forget to enable the “repo” and “workflow” permissions when generating it)

Leave a Comment