GitHub出现问题:Please make sure you have the correct access rights and the repository exists。

原因:公钥出问题了,要先设置用户和邮箱再重新生成ssh公钥即可。

1.  删除.ssh文件夹(直接搜索该文件夹)下的known_hosts

GitHub出现问题:Please make sure you have the correct access rights and the repository exists。---解决

2.打开Git Bash输入:ssh-****** -t rsa -C "username" (注:username为你git上的用户名),

如果执行成功。返回的是:

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/username/.ssh/id_rsa): //这里的username是电脑上的用户名,这个地址也是文件的存储地址

3.直接按回车

如果你以前有存储地址会返回/Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)?     直接输入y回车

如果以前没有储存地址就会出现Enter passphrase(empty for no passphrase);     也直接回车

4.以上两种情况回车后都会出现 Enter same passphrase again ,然后接着回车

会显示一长串内容其中还有一些..o.. o oo .oS. 之类的代码,这说明SSH key就已经生成了。文件目录就是:username/.ssh/id_rsa.pub.

5.然后找到系统自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,用记事本打开id_rsa.pub将全部的内容复制。

6.打开https://github.com/,登陆你的账户,进入设置(Settings)找到SSH and GPG keys

GitHub出现问题:Please make sure you have the correct access rights and the repository exists。---解决

GitHub出现问题:Please make sure you have the correct access rights and the repository exists。---解决

7.然后将你复制的内容粘贴到key中

GitHub出现问题:Please make sure you have the correct access rights and the repository exists。---解决

8.最后再Git Bash输入:ssh -T [email protected]

会跳出一堆内容你只需输入yes回车,然后他会提示成功了。之后就可以正常使用git clone命令了

 

相关文章:

  • 2021-12-22
  • 2021-04-01
  • 2021-06-25
  • 2022-12-23
  • 2021-11-22
  • 2021-12-25
  • 2021-10-06
猜你喜欢
  • 2021-12-17
  • 2021-09-23
  • 2021-07-02
相关资源
相似解决方案