The following commands to generate sshkey:
ssh-keygen -t rsa -C "[email protected]"
Follow the prompts to complete the three-carriage return (password is blank), you can generate ssh key;
After the addition, the terminal (Terminal) enter:
ssh -T [email protected]
If the return:
Hi XXX! You've successfully authenticated, but Gitee.com does not provide shell access.
Then add prove successful.
Add the public key to the git servers; (eg: github; gitee; ...)
draw focus: the implementation of ssh-add -K ~/.ssh/id_rsa
the sshkey added to the keychain;
Host 'git server domain'
the HostName 'git server domain'
PreferredAuthentications the publickey
IdentityFile ~ / .ssh / id_rsa (route private key)
Such as coding
Host conding.com HostName e.coding.net IdentityFile ~/.ssh/id_rsa_coding