git下載代碼遇到的‘Please make sure you have the correct access rights and the repository exists’問題

 

接着昨天的搭建博客,今天想直接把vuepress克隆到個人電腦上,結果出現了問題vue

忘記截圖了,反正就記得這麼一句話:‘Please make sure you have the correct access rights and the repository exists’git

在網上搜索了一下,參考了大神的博客,終於正確改過來了。原博客地址:https://blog.csdn.net/jingtingfengguo/article/details/51892864github

我來作一下記錄,省了之後忘記。服務器

 

出現這個問題是由於ssh key出現問題,連不上服務器ssh

一、從新在git設置一下身份的名字和郵箱spa

git config --global user.name "yourname".net

git config --global user.email 'your@email.com'

blog

 

2.刪除.ssh文件夾下的know_hosts博客

注:在C盤用戶文件夾下.ssh,點擊進入,手動刪除know_hostsit

三、git輸入命令

$ ssh-keygen -t rsa -C 'your@email.com' 

注:填寫本身設置的郵箱地址

填完之後會出現:一直摁回車就行了

出現到這塊的時候系統自動在.ssh文件夾下生成兩個文件:id_rsa 和 id_rsa.pub,用記事本打開id_rsa.pub,將其所有複製

打開https://github.com/,登陸本身的帳戶,進入設置

點擊New SSH key

 

 將id_rsa.pub的內容粘貼到key中

 

 

 五、在git中輸入命令

  ssh -T git@github.com

到這步就算是成功了

而後就能夠使用git下載啦

嚕啦啦……

相關文章
相關標籤/搜索