Setting up git SSH key on ubuntu
Yeah~~ Long time no see guys~
These day I was porting code from one computer to others by git.
If you are familiar with it please don't be too serious, I'm just new of it.
The problem is that typing user name and the password wasted me lots of time.
Hence, I try not to use http but ssh link to the gitlab.
(At least I don't need to type the username!! Especially it's an e-mail !)
So ... the tutorial to make ssh work on ubuntu to gitlab is below.
1. Generate a SSH key for ur computer.
ssh-keygen -t rsa -C "yourmail@mail.com" -b 4096
2. Copy the ras key to clip board , you can copy by urself or apt-get install xclip tool to do it.xclip -sel clip < ~/.ssh/id_rsa.pub
3. And then you just have to add the key to the git setting.If you used gitlab as I do you can go setting --> Deploy key
4. Then you Named the key and paste the key to the text edit , AND! check the "write access allowed" below!
5. After saved you will see the key you added on the bottom of the web page~!
Thanks~!
provide |
Comments
Post a Comment