You are on page 1of 25

GitLab Client Installation & WEB-UI

This guide is to walk through GitLab client installation on windows machine, setting up authentication method and it also
talks about getting familiar with GitLab web interface by creating an example project, uploading code files into servers,
accessing them on web UI, web editing etc.

Note: This document is version specific and supports the below specified versions only. Please cross check the
installer files against the version mentioned in this document and check with document owner if you are looking
for any other versions.

I.

Index:
1.
2.
3.
4.
5.

Gitlab Client Installation


Setting up profile using GitLab WEB-UI
Creating a local repository, a test code file and syncing it with Git Server.
Editing file on WEB-UI
Help

1. Gitlab Client Installation


1.1. Pre-requisites: Available in <TBD>
1.1.1. MsysGit: http://msysgit.github.io (Version - Git-1.9.4-preview20140611.exe)
1.1.2. Tortoise-Git: https://code.google.com/p/tortoisegit/wiki/Download?tm=2 (version - TortoiseGit1.8.9.0-64bit.msi)

1.2. Installing TortoiseGit: TortoiseGit-1.8.9.0-64bit.msi (Steps are same for TortoiseGit-1.8.9.032bit.msi)


1.2.1. Double Click on TortoiseGit-1.8.9.0-64bit.msi (Use TortoiseGit-1.8.9.0-32bit.msi for 32-bit OS)

1.2.2. Click Next and then Next

1.2.3. Leave the default and Click Next

1.2.4. Click Install to begin the installation

1.2.5. Click Finish to complete the TortoiseGit_1.8.9.0 installation.

1.3.

Installing MsysGit: (Version - Git-1.9.4-preview20140611.exe)


1.3.1. Double Click or RUN-AS Administrator on MsysGit Installer pack and CLICK Next and then Next

1.3.2. Select the path to C:\Git and Click Next.

No Spaces are allowed

1.3.3. Selecting additional Icon set: Select additional Icon for Quick Launch and Desktop and Click Next

Check Additional icons


and select all under it

1.3.4. Leave the default and Click Next

1.3.5. Leave the default and Click Next

1.3.6. Select Use (Tortoise)Plink as SSH binary for MsysGit and then Click Next:

Select this

Browseand
andSelect
Select TortoisePlink.exe
TortoisePlink.exe
Browse

1.3.7. Leave the default and Click Next, It will start the MsysGit installation and takes around 3Minutes

1.3.8. Click Finish to end the installation.

1.4.

Setting up Environment PATH Variables on Windows-7

1.4.1. Copy the below content which will be the Environment PATH Variable for Git and Tortoise

;C:\Git\bin;C:\Program Files\TortoiseGit\bin
1.4.2. Click on windows Start button, Right Click on Computer and select Properties

Right Click

Select Properties

1.4.3. Click on Advanced Settings

Click here

1.4.4. Under Advanced tab, Click on Environment Variables button

Click on Environment Variables button

1.4.5. Under System Variables, Click on the variable Path and then Click on Edit button.

Click on Path
Click on Edit button

1.4.6. Under Variable value row, move to the end of the text, Paste the copied content and then
Click OK

Paste at the end

1.4.7. Click OK and then again OK, Close all other windows

1.5.

Creating SSH key for GitLab Server:


1.5.1. Open a CMD Navigate to C:\Git\
1.5.2. Create .ssh directory with the command mkdir .ssh
1.5.3. Navigate to .ssh directory
1.5.4. Type in ssh-keygen and press Enter
1.5.5. Type id_rsa and hit Enter
1.5.6. When it prompts for the passphrase, just hit Enter and again hit Enter. Dont type any password.
Entire steps look like below.
Type ssh-keygen

Type id_rsa

1.5.7. Copy the C:\Git\.ssh folder to C:\Users\<User_Name>\ directory:

Copy and Paste


(Do not Drag and Drop)

So now you are all set with the agent and git environment, we should be ready to work out a test script at this stage.
Let us create our first script and get that on to Git WEB-UI.

2. Setting up profile using GitLab WEB UI


2.1. Adding SSH Key to GitLab Profile: This requires all of the Steps 1.1-to-1.5 be completed.
Now the newly created SSH key should be added to the user profile under your GitLab profile (Git WEB-UI)
2.1.1. Logon to the Gitlab server
2.1.2. Go to the Profile, Click on SSH Keys and then Click on Add SSH Key

2.1.3. Enter the Title and copy the key from id_rsa.pub file in C:\Users\<User_Name>\.ssh\ (Open with
note pad and copy all of the content).

Select Open With


Right Click on the file

Select Notepad

Click OK

Select all and then


Copy the content

2.1.4. Back to WEB-UI, Paste the content into the Key text box and then save it by Clicking on Add Key button.
Can be your computer Name

SSH Key No spaces, no


additional comments are
allowed

Now you should be seeing something similar to this.

2.2.

Creating a test Project on the GitLab Server:

2.2.1.

Logon to the WEB-UI with the provided credentials and create a test project as shown below.

2.2.2.

Click on the

+ icon, enter project name as test, enter some description and Click on Create

Project

Click on

+ icon to create a new project


Enter the project title here

Enter the project


description here

Click here to create the project


with the above details

Immediately after creating your brand-new project, you should be seeing something very similar to this.

2.3.

Client side Git Global Setup

2.3.1. Copy the two line code from the Git Global setup and run the same in a CMD on your workstation

We are all set to create a local repository and push the same to GitLab server which allows us to review, edit,
comment, create wiki and do more on the WEB-UI.

3. Creating a local repository, a test code file and syncing it with Git Server
3.1. Preparing the local repository
3.1.1. Go to any location on your computer and create a folder by some name, for now name it as test

Note: For isolation purpose, plan a directory structure and create project wise folders under it as E:\repo\<project>
and also use proper project name instead of test or example.

3.1.2. Adding the project test to Git repo list: Right Click on the test folder and select Git Create repository
here , Click OK and then again OK

Refresh the
directory to a
see a Tick
mark on the
project test

You could also see a .git folder inside the test project. It shows that a local repository is ready to be synced with the
test project we created on the server in Step (2.2) (Look at the Step (2.2) if you have not done yet)

3.2.

Adding a test.pl Perl script to the repository:


3.2.1. Create a hello.pl file and add a few lines as shown below and save it. We can see a Blue question mark
on hello.pl indicating that the local repo has not been committed (Refresh the folder if you dont see it).

3.3.

Preparing Commit: Inside the test folder, Right Click on empty area and select Git Commit->master,

3.3.1.
3.3.2.
3.3.3.
3.3.4.
3.3.5.

Type your commit message in Message box,


Select Set Author Date
Select Set Author
Click on All
Click OK at the end

Enter the commit


message for reference.
Check both
the boxes
Click on
ALL

Right Click in the empty area and


select Git Commit -> Master
Click OK

3.4.

Pushing your files to the GitLab server: Click on Push, Select Push all branches and then Click Manage.
This will open up a new window which is TortoiseGit control pane.

Click Push

Select Push all branches

Click on Manage

3.5.

Configuring the GitLab server on TortoiseGit:

3.5.1. Expand Git available on left pane, Click on Remote, Enter Remote name, put GitLab server URL in the
URL text box

(4) Enter some name

(1) Expand Git and


Click on Remote
(3) Enter GitLab URL (Syntax below)
git@<GitLab_FQDN>:<your_GitLab_ID>/<project_name>.git
(2) Click Ass New/Save to
save the changes

3.6.

Configuring SSH client for TortoiseGit:

3.6.1. Click on Network and on the right side, enter the SSH client path as shown below (i.e.
C:\Git\bin\ssh.exe). At the end, Click on Apply and then Click on OK
This will set the TortoiseGit to use ssh client from the Git installation as the default during the authentication
against the GitLab server.

(4) Click on Network

(3) Enter Git ssh.exe path

(2) Click on Apply


(1) Click on OK

Note: If you have a proxy in place for everything (SSH, Telnet, SFTP, HTTP), then please set it here.

Click OK. This will open up a windows


showing the Git command progress pushing
the newly created project into the GitLab
server.

As it is first time with GitLab server, a new


Security Alert window will popup asking you
to accept the server rsa2 key.
(5) Click on OK

Click on Yes button to accept it.


Note: This will not appear again unless you
change the SSH key (Refer Step-2.1)

(6) Click on Yes

3.7.

Confirming the Push

3.7.1. The Git Command Progress window shows the progress of the project and its contents are being
pushed on to the GitLab server. This depends on the size of the project.
At the end, you should see a resultant window very similar to the one below. Close the window to finish the Push

Refresh the Project directory and you could see that Blue exclamatory mark dissapeared and a Green tick mark
over the source code file indicating that the Git is insync with the local and server.

4. Editing the source code on GitLab WEB-UI


4.1.

Back to GitLab WEB-UI, Click on the Projects under Dashboard

4.2.

Click on Files and then Click on available file to view its source code. You could also see all the available
options on the Right side of the page against that source code file.

2
1

Expanded Source code


view on the WEB-UI

Well done, I have got my first file helo.pl on to the GitLab WEB-UI.
Hope you will enjoye the GitLab. So please let me know your feedback.

Thanks.
-Girish KG (girish.kg@hp.com)

Play around with all the


options available to know
more about WEB-UI

5. Help
5.1. Client Installation/config Help on Windows-7
5.1.1. Contact girish.kg@hp.com with details

5.2. GitLab Help


5.2.1. See help section under profile on the GitLab server
5.2.2. https://www.digitalocean.com/community/tutorials/how-to-use-the-gitlab-user-interface-to-manageprojects
5.2.3. http://doc.gitlab.com/ce/
5.2.4. https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md

5.3. TortoiseGit help


5.3.1. https://code.google.com/p/tortoisegit/wiki/FAQ

You might also like