A Gitlab tutorial — Things to do after installation

Earlier we have discussed detailed installation of Gitlab server on CentOS & Ubuntu systems. Once we have our Gitlab server ready, we must be able to perform common operations like the ones mentioned below,

1- Add SSH keys

2- Create/Remove User

3- Create/Remove Groups

4- Create Project

In this Gitlab tutorial, we are are going to discuss just that. We will learn how we can perform all these things with step by step with the help of some screenshots.


Gitlab Tutorial


1- Add SSH keys

We need to add our ssh key to Gitlab server as it allows us to access to gitlab with authentication that does not required username & password. To do this we first have to create public/private ssh keys, follow the steps mentioned below,

Open terminal & run the following command from temrinal,

$ ssh-keygen -t rsa

We will first be asked to enter the file name , than the passphrase for key. We can leave them as defaults by pressing enter key. Now we should have a public Key by name ‘id_rsa.pub’ & private key with name ‘id_rsa’ in the folder ‘/home/user/.ssh’. We also have detailed tutorial on creating SSH keys, you can READ IT HERE.

Now that we have ssh key ready, open Gitlab server & goto URL

https://GITLAB_URL/profile/keys

or you can also login to Gitlab with your user & than goto “Settings” & there look for “SSH Keys”. Now we need to copy the contents of ‘id_rsa.pub’ i.e. our ssh public key here. It should look something like,

gitlab tutorial

Next click on ‘Add key’ to save the ssh key. That’s it, we are done.

2- Create/Remove User

To create a new user for Gitlab server, we need to goto ‘Admin Area’ after logging into the gtilab. Admin Area can be accessed by clicking on the “Wrench” icon on top right coner or alternatively we can use the following url “https://GITLAB_URL/admin/users”.

Next click on ‘Users’ tab in Admin Area & than click on ‘New User’,

Gitlab tutorial

Now Enter the details for user,

Gitlab tutorial

Once all the details have been entered, click on ‘Create User’ to complete the creation procedure.

Now if we need to remove access for the user from Gitlab, we can either Block the user or we can remove it permanently. Both these options can be accessed by clicking on setting options for the user,

Gitlab tutorial

Block or Delete the user as per requirement.

3- Create/Remove Groups

Process for creating Group is quite similar to creating a user. We go to ‘Admin Area’ , look for tab ‘Groups’ & than click on ‘Create Group’. Than we need to enter the details regarding the group & whether we want to keep our group as ‘Public’, ‘Private’ or ‘Internal’.

Gitlab tutorial

Once done, click on ‘Create Group’ to create the group. Now we can add users or projects to the group by clicking on the Group name & add than selecting either projects or ‘Add users’ option there. To delete the project, we have an option where our group name is mentioned.

4- Create Project

Option to create new project should be on the first screen when you login to the Gitlab server. Click on the icon ‘New Project’ & than on the next screen, mention all the details related to project

Gitlab tutorial

& click on ‘Create project’. & we can now start working on project. To start working on Gitlab, we should have an idea of git commands, please refer to our article on ‘Some Useful Git commands’ to know about the git commands.

We now end this Gitlab tutorial on performing some common operations required after Gitlab installation. We are in process of writing some more tutorials regarding Git & Gitlab, so be back soon & please feel free to send in any questions or queries using the comment box below.

If you have found this article to be useful, please share it among your friends/colleagues/followers. THANKS !!!

If you think we have helped you or just want to support us, please consider these :-

Connect to us: Facebook | Twitter | Google Plus

Donate us some of your hard earned money:

Linux TechLab is thankful for your continued support.

Shusain

Passionate about Linux & open source. Loves to learn, read & write about Linux as well as new technologies.

You may also like...

1 Response

  1. Andrew says:

    Great tutorial, I’ve just set up a GitLab server at work and will apply these suggestions.

    One thing I did notice is some confusion between the words “then” and “than”, sadly this is quite common on the net.
    “Then” is correctly used in a sequence of events: first this then that.
    “Than” is correctly used to compare things: he is faster than I am.

    In the article:
    We will first be asked to enter the file name , (“than” should be “then”) the passphrase for key.
    … clicking on the Group name & add (XthanX -> then) selecting either projects…
    Click on the icon ‘New Project’ & (XthanX -> then)on the next screen…

    The internet provides very useful information on just about everything except grammar and spelling, for those you need a decent dictionary (or dictionary website like oxford).

    Thanks for your work on the tutorial.

Leave a Reply

Your email address will not be published. Required fields are marked *