When prompted to solve a new computer to use git clone file: Permission denied (publickey) fatal:. Could not read from remote repository Please make sure you have the correct access rights and the repository exists problem.

New computers coming, very happy, hin Ferguson, but the thought of a series of configuration environment, code migration acid what time it is cool,

Today I encountered a problem when a new PC clone can not be cloned, record it, hoping to help people in need

Reported an error as follows:

Permission denied (publickey).

fatal: Could not read from remote repository.  

Please make sure you have the correct access rights and the repository exists

Solution:

1 View .ssh file in a folder on your computer whether there id_rsa.pub file, enter the command line :type %userprofile%\.ssh\id_rsa.pub

** If you see a long string of start ssh-rsa, you can skip ssh-keygenstep.

2 If not so now by using the following command to generate a new SSH key:ssh-keygen -t rsa -C "你的git邮箱",然后一直按enter就可以

3. At the command line, enter againtype %userprofile%\.ssh\id_rsa.pub  然后复制那串以ssh开头的字符串

4. Locate the github pages Profile Settings save the page, and copy the contents to the following screenshot:

 

Guess you like

Origin www.cnblogs.com/fjy49/p/10951080.html