GitLab is a massive open source project with over 600 contributors, all working together to create an amazing platform to collaborate on code. Every month on the 22nd, a new version of GitLab is released, and every month new features are added. To make you aware of the power of GitLab, we walk through some of its features in these blog posts.
We start by looking at GitLab Groups. GitLab groups allow you to group projects into directories and give users access to several projects at once.
When you create a new project in GitLab, the default namespace for the project is the personal namespace associated with your GitLab user. Below we will see how to create groups, put projects in groups and manage who can access the projects in a group.
How to create GitLab groups
You can create a group by going to the 'Groups' tab of the GitLab dashboard and clicking the 'New group' button.
Next, enter the name (required) and the optional description and group avatar.
When your group has been created you are presented with the group dashboard feed, which will be empty.
You can use the 'New project' button to add a project to the new group.
Note that there's also the option to create subgroups and top-level groups.
After you create a group, here are a few other things you can do with it:
- Adjust user visibility level
- Share projects with groups
- Control project access
- Transfer projects
- Create personal projects
How to transfer an existing project into a group
You can transfer an existing project into a group you own from the project settings page. First scroll down to the 'Dangerous settings' and click 'Show them to me'. Now you can pick any of the groups you manage as the new namespace for the group.
GitLab administrators can use the admin interface to move any project to any namespace if needed.
Update: For more info, check out tutorials in the docs on moving a personal project to a group and converting a personal namespace into a group.
How to add users to a group
One of the benefits of putting multiple projects in one group is that you can give a user access to all projects in the group at the same time with one action.
Suppose we have a group with two projects.
On the 'Group Members' page we can now add a new user Barry to the group.
Now because Barry is a 'Developer' member of the 'Open Source' group, he automatically gets 'Developer' access to all projects in the 'Open Source' group.
If necessary, you can increase the permissions or access level of an individual user for a specific project, by adding them as a Member to the project.
To see groups where users have a direct or indirect membership, select "Your groups."
How to manage group memberships via LDAP
In GitLab Enterprise Edition it is possible to manage GitLab group memberships using LDAP groups. See the documentation for more information.
How to allow only admins to create groups
By default, any GitLab user can create new groups. This ability can be disabled for individual users from the admin panel. It is also possible to configure GitLab so that new users default to not being able to create groups:
# For omnibus-gitlab, put the following in /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_default_can_create_group'] = false
# For installations from source, uncomment the 'default_can_create_group'
# line in /home/git/gitlab/config/gitlab.yml
Update: Check out the documentation for more info on GitLab's latest features for managing groups, access control for groups, migrating groups, restricting access by domain or email, group file templates, and more.