Difference between revisions of "GitLab"
m (→Git and managing large files)
(→Instructions displayed when creating a new project)
|Line 107:||Line 107:|
$ git push -u origin master
$ git push -u origin master
Revision as of 14:22, 18 July 2016
Quote from the GitLab website
GitLab is an incredibly powerful open source code collaboration platform, git repository manager, issue tracker and code reviewer.
Our gitlab service is facing the public internet. Meaning you don't need to make use of a VPN tunnel to use it.
You'll see two login options:
- Science login - for students and employees of the Science Faculty. Use your Science login.
- Standard - for external users.
Although anyone with a Science Login can login to GitLab, only people that have actually logged in to GitLab will be visible for other GitLab users. Keep that in mind when adding people to projects or groups.
Git and managing large files
As of July 18th 2016, LFS support is enabled on the GitLab server. Git lfs allows you to manage version control on large files without storing them in the git repository. Please refer to the git lfs project website for more information. Be aware that git-lfs exclusively works with the https transport layer (not ssh).
When using git over https, you might want to use the git credentials cache:
Since projects are usually not restricted to employees or students of the Science Faculty, our GitLab service allows external users as well. Unlike our Subversion web application, GitLab does not provide a way of creating external accounts by users without the 'administrator' role. If you wish to add external users to your GitLab project, please send a request to , mentioning the following details:
- Desired login name - We'll prefix it with an underscore by means of avoiding collisions with our existing and future Science logins.
- Full name - This is how you'll find the user in the GitLab system. For example, when adding the account to your project.
- Mail address. GitLab will use this mail address to send an automatically generated mail with instructions to set a password.
As soon as Postmaster created the account, you should be able to add the external login as a member your project. We're not yet sure whether external users should have the option to create projects, so the project limit for external users is set to 0 initially. Depending on the kind of work flow (gitlab merge requests, etc), it might be necessary to give external users the option to create one or more projects.
Ideally, postmaster should not be 'in the loop' and users with a Science login should be able to create external user accounts themselves, however there seems to be a bug in the GitLab API that prevents us from setting this up.
Press ? to display all available keyboard shortcuts!
Migrating from Subversion
We have automated the migration from Subversion to GitLab. Contact if you wish to have clone access to your migrated repository.
Manual migration from Subversion
Inspired by this short manual, an SVN to git conversion could boil down to something like:
cd /tmp/ git svn clone --no-metadata -A users.txt https://svn.science.ru.nl/repos/myproject cd myproject git remote add gitlab :yourscienceloginname/myproject.git git push --set-upstream gitlab master
Git URLs (https and ssh) are shown on the top of the project page in gitlab. The generic repository URL for the science SVN server is:
And for CS:
You can also see this for public svn repositories on https://svn.science.ru.nl (viewing private repositories requires authentication).
Instructions displayed when creating a new project
Just copied them over here, because these instructions are only displayed when your project does not yet contain any files.
Git global setup
$ git config --global user.name "Your Name" $ git config --global user.email ""
Create a new repository
$ mkdir newproject $ cd newproject $ git init $ touch README.md $ git add README.md $ git commit -m "first commit" $ git remote add origin :yourscienceloginname/newproject.git $ git push -u origin master
Push an existing Git repository
$ cd existing_git_repo $ git remote add origin :yourscienceloginname/newproject.git $ git push -u origin master
- Caching your github password in git
Turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.
In Terminal, enter the following:
git config --global credential.helper cache
- Set git to use the credential memory cache