0% found this document useful (0 votes)
12 views3 pages

Gitlab Repositories Configuration

This document provides step-by-step instructions for setting up GitLab repositories using SSH keys. It includes generating an SSH key pair, configuring the SSH settings, adding the key to GitLab, and cloning the repositories. The instructions emphasize the importance of saving fingerprints for future access.

Uploaded by

od.saver2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Gitlab Repositories Configuration

This document provides step-by-step instructions for setting up GitLab repositories using SSH keys. It includes generating an SSH key pair, configuring the SSH settings, adding the key to GitLab, and cloning the repositories. The instructions emphasize the importance of saving fingerprints for future access.

Uploaded by

od.saver2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Gitlab repositories setup Instructions

[If you have any confusion or having issues, please let me know @helal]

Generate an SSH key pair

1. Open terminal, Go to .ssh directory


> cd .ssh
2. Now type:
> ssh-keygen -t rsa -b 2048 -C "gitlab ssh key"
3. Press Enter. Will uutput similar to the following is displayed:
> Generating public/private rsa key pair.
> Enter file in which to save the key (/home/user/.ssh/id_rsa):
4. Write gitab_id_rsa at the end of second line
> Enter file in which to save the key (/home/user/.ssh/id_rsa): gitab_id_rsa
5. Press Enter :
6. It will ask for passphrase, you could keep this blank and continue
7. Finally, Will generate rsa ssh key pair (gitlab_id_rsa.pub and gitlab_id_rsa) in .ssh
directory.
8. Now, create a new file in .ssh directory named config if there is no file already exist in the
same directory and put the below lines; Ref
# GitLab.com
Host git.zntral.net
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab_id_rsa
9. Open the gitlab_id_ras.pub file in notepad and copy the content
GO ssh key settings page: SSH Keys · User Settings · GitLab (zntral.net) and hit ‘Add new
key’ Button!
And put the content in the key text area and also set title. Then hit “Add Key” button!

10. After savig the key information, you will be provided the fingerprints. Which will be needed
in the next steps!
11. Now clome the backend/frontend repository using ssh url;
The example given below is for frontend
Run the command: git clone [email protected]:zntral/frontend.git

Note: For the first time access, you may encounter with a dialog like this. Either you can
copy a finger print (md5) and put in the input box and continue. You’re all set!

Repository wlll be cloned! Clone the backend too!

Well done! Now you’re ready to go!

You might also like