Step 1: Added a config file in ~/.ssh/ folder which looks like User git Hostname gitlab.com IdentityFile ~/.ssh/id_rsa_gitlab TCPKeepAlive yes IdentitiesOnly yes Step 2: Just clone the git repo WITHOUT sudo.
Posts
Gitlab Gen key
- Get link
- X
- Other Apps
Go to "Git Bash" just like cmd. Right click and "Run as Administrator". Type ssh-keygen Press enter. It will ask you to save the key to the specific directory. Press enter. It will prompt you to type password or enter without password. The public key will be created to the specific directory. Now go to the directory and open .ssh folder. You'll see a file id_rsa.pub . Open it on notepad. Copy all text from it. Go to https://gitlab.com/profile/keys . Paste here in the "key" textfield. Now click on the "Title" below. It will automatically get filled. Then click "Add key". Now give it a shot and it will work for sure.