I migrated my private projects to GitLab about 2 years ago when we started using it at work. I have nothing against GitHub, but I really like GitLab's interface. The problem is GitHub is THE place to host your stuff if you want others to have easy access to it. This meant I had to maintain two different remotes for every project.
Today, I fixed that.
GitLab's mirror push interface is really easy to use. You can access it via Settings > Repository > Push to a remote repository.
Usage:
- Add the GitHub project's URL with the proper credentials to the 'Git repository URL' field
- Click 'Update Now'
- GitLab will show:
- GitHub will show:
Woo.
Sources:
Top comments (3)
Aren't you storing your GitHub password in clear in GitLab options this way?
You are. Use at your own risk. Alternately you can set up a GitHub token and use that instead.
Ideally this would be done using ssh and post-receive hooks on your hosted GitLab, but with the goal being to automate my hobby workflow, spinning up my own GitLab seemed excessive.
If you have an alternative for automatically mirroring to GitHub, I would absolutely love to hear it.
Other options I've used are:
This is not available with the Gitlab CE version.