Set SSH Key
Authentication when connecting an existing warehouse on Github, it is through the use of public key SSH
Input terminal of the terminal
ssh-keygen
The meaning of this command is to generate ssh key, and then keep pressing the Enter key.
Cd to the .ssh directory:
You can see id_rsa file is a private key, id_rsa.pub is the public key
View the contents of id_rsa.pub, cat ~ / .ssh / id_rsa.pub
Click on SSH and GPG keys directory, enter - key content on github column Key position
After completion, as shown below:
verification
After completion of the setting, start using the local private key to authenticate communication and Github
Input at the local terminal:
ssh -T [email protected]
Content appears shown below, indicates authentication success!