Загрузка страницы

How to clone projects from GitLab to your computer - SSH Key

In this video tutorial we are going to see how to clone the project from GitLab to your local computer and we also learn how to grant permission to your pc through a public ssh key.
We will see how the permission issue is raised, how to generate public ssh key in mac os as well as windows users, and also learn how to set up all with live example.

Let’s start!!

Open the terminal in your system and locate the location where you want to clone the files. In video Im going to clone in htdocs folder of mamp application.
CD Applications
CD Mamp
CD Htdocs
Now to clone we have the command GIT CLONE path of the git.

Open the GitLab and navigate to your project which I have show in the video here. Click on the Clone button. Copy the path. In the terminal paste it. It's shows me permission denied.
Please make sure you have the correct access rights.

Now let’s see how to grant permission to clone the project from GitLab to your system. Navigate to GitLab again.

Click on the profile image, and navigate to the edit profile page.
In the edit profile page, navigate to the SSH Keys menu.
Here is the place where we have to add the public ssh key.

Now let's learn how to generate the ssh key.
Back to the terminal, Let’s open the new command window.
To generate the ssh key, we have the command ssh-keygen -t rsa

SSH key is generated in the system. Before moving further, let's see who to do the same thing for the Windows user.
Open the command prompt.
In a command prompt, hit the command ssh-keygen
Enter file in which to save the key, Enter
Enter Passphrase. Enter

The ssh key has been generated in the system.
Navigate to the .ssh folder where you can see two files. Do not share your private key with anyone. Open the public key and copy it.

Let’s copy the public ssh key from the system. To copy hit the command
Pbcopy id_rsa.
Navigate to GitLab again, and paste the public ssh key. Do not forget to remove the last space from it.
Press the add key button.

Please confirm before you move ahead.
Back to the terminal. Try to clone again.
It must work now.
In this way, we can grant access to GitLab to clone the project from GitLab to your local system.
I hope it helps you to figure out your solution.

SUBSCRIBE to our YouTube channel for more videos: https://www.youtube.com/c/Master2Teach?sub_confirmation=1

Like us on Facebook: https://www.facebook.com/master2teach

For more content go to https://master2teach.com/

Видео How to clone projects from GitLab to your computer - SSH Key канала Master2Teach
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
25 сентября 2022 г. 11:35:24
00:03:47
Яндекс.Метрика