Create a public purpose of:
Use SSH public key allows you to use a secure connection when your PC and the cloud code communications (git to use the remote SSH address)
git Right-click and select Paste Paste
step:
-
Open Terminal (git) into the .ssh directory
-
Entry
cd ~/.ssh
If the .ssh folder does not exist, execute commands automatically create
mkdir ~/.ssh
(I have created, so do not use this command)
-
-
RSA key pair generation
-
ssh-keygen -t rsa -C "your mailbox @ xxx.com"
-
-
Check the contents of the public key
-
cat ~/.ssh/id_rsa.pub
-
-
The (entire) Copy and paste the contents of the public key (Note: the contents of the public key to ssh-rsa beginning)
- Paste the address https://gitee.com/profile/sshkeys
- Paste the address https://gitee.com/profile/sshkeys
-
Tested public key (link test SSH) is added after the completion of the public key
- ssh -T [email protected]
-
When the terminal prompts welcome to Gitee.com, yourname! Indicates a successful link
So far in the future as long as ssh copy link address, you can then use git commands related operations!
Reproduced in: https: //www.jianshu.com/p/416ac815b2b1