git add ssh authentication to github

  Since it is more convenient to use ssh locally to the remote github, you do not need to enter the username and password every time, so let's record how to add ssh encryption to the local warehouse and remote github.

  one. Create SSH KEY. First check if there is a .ssh directory in the user directory of your C drive. If so, see if there are two files, id_rsa and id_rsa.pub . If so, skip to the next step. If not, create it with the following command

    $ ssh-keygen -t rsa -C "[email protected]"

      Then drive all the way back. Then you will find the two files    id_rsa and id_rsa.pub in the .ssh directory under the user

    

  two. Log in to Github, find the icon in the upper right corner, open and click Settings, select SSH and GPG KEYS in it, click New SSH key in the upper right corner, then fill in the Title, and then copy the content in id_rsa.pub just now to In the Key content box under Title, finally click Add SSH key to complete the encryption of the SSH Key. The specific steps can also be seen below:

    

 

   

 

 

    

 

   

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326081505&siteId=291194637