Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you h

Questions are as follows:

Reason: The server public key (publickey) is not added to github, so it cannot be recognized. Therefore, you need to obtain the public key of the local computer, log in to the github account, and add the public key to github.

solution:

Step 1: Check whether there is an SSH key locally: cd ~/.ssh

If not, then generate the key: ssh-keygen -t rsa -C "email", where email is your github login mailbox, and then keep pressing the Enter key; the key will appear in the same level directory.

Step 2: Enter id_rsa.pub, copy the key 

Step 3: Log in to the github account, enter the personal settings settings--->ssh and gpg keys-->new ssh key to add the key. The title can be named by yourself.

----------------------------end----------------------------

 

Guess you like

Origin blog.csdn.net/qq_28057379/article/details/105735034