此问题是需要重置ssh密钥

解决步骤如下:

1、重置用户名和邮箱:

打开Git Bash 进入Git命令,输入以下命令

git config --global user.name "你的用户名随便写"

git config --global user.email "你的邮箱"

Git出错:“Please make sure you have the correct access rights and the repository exists.”_git

 

 2、删除known_hosts文件:

打开C盘用户下的.ssh文件夹,地址是C:\Users\Administrator\.ssh,删除known_hosts文件

Git出错:“Please make sure you have the correct access rights and the repository exists.”_github_02

 

 3、在Git输入命令:$ ssh-keygen -t rsa -C "你的邮箱"

Git出错:“Please make sure you have the correct access rights and the repository exists.”_重置_03

一直回车直到出现下一个命令行。

4、复制公钥:

完成第3步后,此时.ssh文件夹里出现了两个文件,分别为 id_rsa(密钥)和id_rsa.pub(公钥),用记事本打开id_rsa.pub并全选复制其中的内容。

Git出错:“Please make sure you have the correct access rights and the repository exists.”_重置_04

 

 

5、设置公钥:进入自己的gitHub主页,进入设置界面,如图。

Git出错:“Please make sure you have the correct access rights and the repository exists.”_用户名_05

 

 

 Git出错:“Please make sure you have the correct access rights and the repository exists.”_用户名_06

 

点击新建密钥按钮。

 Git出错:“Please make sure you have the correct access rights and the repository exists.”_github_07

 

 进入填写密钥界面:填写自己想写的标题并填入刚刚复制的公钥,最后点击Add按钮

Git出错:“Please make sure you have the correct access rights and the repository exists.”_重置_08

 

 6、进入git,输入命令:ssh -T git@github.com 按回车,然后出现一串字,并输入yes,再回车,成功!!

Git出错:“Please make sure you have the correct access rights and the repository exists.”_github_09