git clone的时候遇到“Please make sure you have the correct access rights and the repository exists”

1.搜索.ssh文件,删除该文件下的known_hosts文件

2.运行Git Bash,输入命令ssh-keygen -t rsa -C "username",然后一路回车

3.在.ssh文件夹里找到 id_rsa.pub文件,打开,全部复制,然后登录 https://github.com/,找到settings,配置

SSH keys

 将之前复制的id_rsa.pub文件里的所有内容黏贴在下面

 

 

 4.最后运行Git Bash,输入命令ssh -T git@github.com

最后就可以正常使用了。

posted @ 2018-08-02 10:34  折花载酒少年事  阅读(13565)  评论(0编辑  收藏  举报