Reputation: 3935
Here is what my dashboard looks like:
Not really sure where to add an SSH key. Anyone have any idea?
Upvotes: 48
Views: 261106
Reputation: 259
Upvotes: 6
Reputation: 1682
Go to your GitLab account: https://gitlab.com/
Click on Settings on the top right drop-down, which will appear once you select the icon(white-fox image [specific to my profile]).
Click on Settings on the top right drop-down, which will appear once you select the icon(white-fox image).
Add/Paste the SSH Key.
How to generate the ssh key: Download gitbash or putty:
After downloading gitbash/putty follow the steps:
Generate a new ED25519 SSH key pair:
ssh-keygen -t ed25519 -C "[email protected]"
Or, if you want to use RSA:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
It will generate the key in => C:\Users\yourname.ssh directory.
Copy the public key and paste in the gitlab location:
Command to run on gitbash to clone the repository:
ssh-agent $(ssh-add C:\Users\youname\.ssh\id_rsa; git clone [email protected]:xyz/SpringBootStarter.git)
Upvotes: 57
Reputation: 1617
First, you need to do open terminal after that type
mkdir -p ~/.ssh
echo public_key_string >> ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
chown -R shabeer:shabeer ~/.ssh
ssh-keygen or ssh-keygen -t ed25519 -C "[email protected]"
xclip -sel clip < ~/.ssh/id_ed25519.pub
~/.ssh/gitlab_rsa.pub
in this time can see your key and copy it, After that Go to the Gitlab settings and chose SSH Keys, you can see there have to option add that copied key
Upvotes: 1
Reputation: 536
Goto https://gitlab.com/profile/keys.
If you are a new user a banner will show at the top of each project page.
You won't be able to pull or push project code via SSH until you add an SSH key to your profile
However, you can dismiss this warning.
Upvotes: 3
Reputation: 415
Upvotes: 21