git clone 报错 Please make sure you have the correct access rights and the repository exists.

问题原因:

ssh key有问题,连接不上服务器

解决方法:

在远程仓库添加本地生成的ssh公钥,步骤如下

1) 使用 git bash 配置账号和邮箱

设置用户名命令: git config --global user.name 'CodeChen01'
设置邮箱命令: git config --global user.email '3069828617@qq.com'

注:CodeChen01和3069828617@qq.com就是你自己的账号和邮箱

2) 执行命名生成公钥文件

执行生成公钥文件命令: ssh-keygen -t rsa -C '3069828617@qq.com'

git clone 报错 Please make sure you have the correct access rights and the repository exists.

 

 注:默认会在文件夹 C:\Users\dmin\.ssh 生成rsa文件

git clone 报错 Please make sure you have the correct access rights and the repository exists.

 

3)把公钥文件(id_rsa.pub)的内容整个复制到远程仓库的ssh公钥输入框中

git clone 报错 Please make sure you have the correct access rights and the repository exists.

 

 git clone 报错 Please make sure you have the correct access rights and the repository exists.

 

点击添加按钮就行了

4)在git bash执行下面的命令,然后输入 yes 就行了

ssh -T git@github.com

 git clone 报错 Please make sure you have the correct access rights and the repository exists.

 

 5)退出git bash再重新clone远程仓库就行了

 

参考链接:

https://blog.csdn.net/jingtingfengguo/article/details/51892864

上一篇:【离散数学】 SEU - 05 - 2021/03/17 - Nested Quantifiers


下一篇:h5调用qq客户端