TIL: set up push mirroring from GitLab to GitHub
2021-01-06 00:00:00 +0000 UTCThe GitLab free tier only allows free mirroring to GitHub, not pulls from GitHub. That requires the first paid tier. To set up your push mirroring follow these steps:
- Go to your project on GitLab. Click Settings -> Repository.
- Click to expand the Mirroring repositories section.
- Enter your Git repository URL. If you’re on the free tier like I am, the Mirror direction option will be locked to push. Otherwise, pick push or pull as you’d like.
- Choose an authentication method.
- Click Mirror repository to set up the mirroring.
You should see in the Mirroring repositories section an entry for your GitHub repo such as https://****:*****@github.com/tydar/kvm-conjurer.git
. You’ll see also Last update attempt and Last successful update columns, indicating when the push to GitHub from GitLab was last attempted and whether it succeeded. On a push mirror setup, GitLab should push your changes to GitHub as they come in.