News for hackers. Stuff that matters.
Re:Take Gitlab to the command line with GLab, an open-source... by gru on Thursday August 06, 2020 @03:47AM (#24068923)
I have created a small tool that automatically mirrors public repos from GitLab to GitHub: https://github.com/grdl/gitlab-mirror-maker

Meaning, a repo can be hosted on GL but still benefit from better exposure and disoverability of GH.

Re:Take Gitlab to the command line with GLab, an open-source... by fileeditview on Thursday August 06, 2020 @07:21AM (#24069957)
How I usually do it if I want to have my project on Github and Gitlab is configure two push remotes like this:

> git remote set-url --add --push origin <github-remote>

> git remote set-url --add --push origin <gitlab-remote>

This way I have an automatic backup to the second remote.

Re:Take Gitlab to the command line with GLab, an open-source... by mcintyre1994 on Thursday August 06, 2020 @09:35AM (#24070725)
Does this mean when you `git push origin <branch>` it gets pushed to both remotes? I had no idea you could have two remotes with the same name, neat!
Re:Take Gitlab to the command line with GLab, an open-source... by giancarlostoro on Thursday August 06, 2020 @10:12AM (#24071035)
TIL that's exactly what this does, alternatively you can add them all to an 'all' remote, to make it more explicit:

https://jigarius.com/blog/multiple-git-remote-repositories#t...

However, you can add multiple URLs to 'origin' and push to them all at once.

Re:Take Gitlab to the command line with GLab, an open-source... by hobo_mark on Thursday August 06, 2020 @06:55AM (#24069808)
But GitLab already has repo mirroring built-in, what am I missing?
Re:Take Gitlab to the command line with GLab, an open-source... by gru on Thursday August 06, 2020 @08:51AM (#24070425)
You're not missing anything. It does use GitLab's mirroring API. However, GitLab doesn't have any global mirroring settings, you need to set up each repo individually. The tool just saves you a huge bunch of clicking around and copy pasting auth tokens. Useful if you have a big collection of repos you'd like to mirror. And if you'd like every new public repo to be mirrored automatically.
Re:Take Gitlab to the command line with GLab, an open-source... by nhumrich on Thursday August 06, 2020 @07:58AM (#24070150)
it's a paid feature: not in community gitlab
Re:Take Gitlab to the command line with GLab, an open-source... by xav0989 on Thursday August 06, 2020 @08:38AM (#24070356)
Pushing from gitlab to another git host is free and in the community edition[1]. Pulling on the other hand is a paid feature.

[1]: https://docs.gitlab.com/13.2/ee/user/project/repository/repo...

Re:Take Gitlab to the command line with GLab, an open-source... by jobvandervoort on Thursday August 06, 2020 @08:10AM (#24070215)
If your project is open source on gitlab.com - you get all paid features for free.
Re:Take Gitlab to the command line with GLab, an open-source... by samanthalee233 on Thursday August 06, 2020 @05:17PM (#24075552)
Here is a link to our program for open source projects for anyone interested! https://about.gitlab.com/solutions/open-source/ (community advocate at GitLab)
Re:Take Gitlab to the command line with GLab, an open-source... by boleary-gl on Thursday August 06, 2020 @09:28AM (#24070677)
This is awesome! Thanks for sharing.