git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题...

 

接着昨天的搭建博客,今天想直接把vuepress克隆到我的电脑上,结果出现了问题

忘记截图了,反正就记得这么一句话:‘Please make sure you have the correct access rights and the repository exists’

在网上搜索了一下,参考了大神的博客,终于正确改过来了。原博客地址:https://blog.csdn.net/jingtingfengguo/article/details/51892864

我来做一下记录,省了以后忘记。

 

出现这个问题是因为ssh key出现问题,连不上服务器

1、重新在git设置一下身份的名字和邮箱

git config --global user.name "yourname"

git config --global user.email '[email protected]'

 

2.删除.ssh文件夹下的know_hosts

注:在C盘用户文件夹下.ssh,点击进入,手动删除know_hosts

3、git输入命令

$ ssh-keygen -t rsa -C '[email protected]

注:填写自己设置的邮箱地址

填完以后会出现:一直摁回车就好了

git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题..._第1张图片

出现到这块的时候系统自动在.ssh文件夹下生成两个文件:id_rsa 和 id_rsa.pub,用记事本打开id_rsa.pub,将其全部复制

打开https://github.com/,登录自己的账户,进入设置

git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题..._第2张图片

点击New SSH key

 

 将id_rsa.pub的内容粘贴到key中

 git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题..._第3张图片

 

 5、在git中输入命令

  ssh -T [email protected]

到这步就算是成功了

然后就可以使用git下载啦

git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题..._第4张图片

噜啦啦……

 

转载于:https://www.cnblogs.com/wsblogs/p/9705764.html

你可能感兴趣的:(git下载代码遇到的‘Please make sure you have the correct access rights and the repository exists’问题...)