Mirror Gitlab to Github

Hello,

I had a working push-mirror setup from Gitlab to Github. At some, this stopped working due to authentication error (I guess because I was using password authentication). So, I tried the new method, that utilizes personal access token, with repository URL in the following format:

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

However, I could not get it to work. I tried putting my username and email I use to login (both with plain @ and with it encoded as %40) as githubusername. I tried putting the access token in both the url and the password prompt, as well as in the passport prompt alone. All combinations of these ended in authorization error.

So, how exactly should the settings look for mirroring to Github to work?

Hi @radeksprta!

  • Is the GitLab repository public?
  • When you created your GitHub personal access token, did you check the public_repo box?

I ask because both of these are prerequisites for mirroring GitLab to GitHub.

From the Repository Settings menu, in the “Mirror Repository” section, is there a red “Error” flag/message?


If so, hover over it with your cursor - does any additional information appear?

It might also be an issue related to Protected Branches or Permissions. Even if you did not specifically set protections, they may be in place.
You can learn about protected branches here:


and find info on permissions here:

Keep me updated and feel free to ask if you have any additional questions.

Best Regards,
Greg M

I guess it must have been some kind of temporary problem on Github’s side - when I checked the repository today, I noticed it started syncing just fine without any changes on my part.

Thanks for your help, though!

@radeksprta Glad to hear that your mirror repository is syncing!
Let me know if the issue should arise again.

Best Regards,
Greg M