Short info
This article will tell you how to easily share your GitLab project (as a mirror) with other code management platforms.
Throughout this tutorial we are using public repository at following location: https://github.com/mkopsnc/beaver. However, you can use any other repository.
1. Set up a push mirror from GitLab to GitHub
1.1. Create personal access token
Before you can proceed with the setup of mirror, you have to create personal access token:
- Github - how to create personal access token at Github
- Gitlab - how to create personal access token at Gitlab
- Bitbucket - how to create personal access token at Bitbucket
1.2. Set up a push mirror on gitlab.eufus.psnc.pl
- Log in to gitlab.eufus.psnc.pl
- On the top bar, select Menu > Projects and find your project
On the left sidebar, select Settings > Repository
- Expand Mirroring repositories
Enter a Git repository URL
Enter a Git repository URL with this format:
If you have Github repo - https://<your_github_username>@github.com/<github_group>/<github_project>.git
If you have Gitlab repo - https://<your_gitlab_username>@gitlab.com/<gitlab_group>/<gitlab_project>.git
If you have Bitbucket repo - https://<your_bitbucket_username>@bitbucket.com/<bitbucket_group>/<bitbucket_project>.git
- For Password, enter your GitHub personal access token
Select Mirror repository
The mirrored repository is listed. For example:
2. How to synchronize with GitHub?
- Make some code changes on GitLab and commit it
- Log in to gitlab.eufus.psnc.pl
- On the top bar, select Menu > Projects and find your project
On the left sidebar, select Settings > Repository
- Expand Mirroring repositories
And click refresh button Udpdate now
Such information should appear on the website:
"The remote repository is being updated..."
- Check your repository on github. Changes should be already pushed from ACH GitLab