Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决。...
?
?? 1 ? 刪除.ssh文件夾(直接搜索該文件夾)下的known_hosts(手動(dòng)刪除即可,不需要git)
?? 2 ? 在下載好的Git中的bin目錄下打開bash.exe輸入命令ssh-keygen -t rsa -C "username" (注:username為你git上的用戶名),如果執(zhí)行成功。返回:
???????Generating public/private rsa key pair.
???????Enter file in which to save the key (/Users/username/.ssh/id_rsa): //這里的username是電腦上的用戶名,這個(gè)地址也是文件的存儲(chǔ)地址,然后我們按
????? 回車,如果你以前有存儲(chǔ)地址會(huì)返回/Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)?直接輸入y回車。如果以前沒有儲(chǔ)存地址就會(huì)出現(xiàn)
?? ?? Enter passphrase(empty for no passphrase);也直接回車,兩種情況回車后都會(huì)出現(xiàn)?Enter same passphrase again 然后接著回車會(huì)顯示一長(zhǎng)串內(nèi)容其中
????? 還有一些..o.. o oo .oS. 之類的代碼,這說明SSH key就已經(jīng)生成了。文件目錄就是:username/.ssh/id_rsa.pub.
?
?3??然后找到系統(tǒng)自動(dòng)在.ssh文件夾下生成兩個(gè)文件,id_rsa和id_rsa.pub,用記事本打開id_rsa.pub將全部的內(nèi)容復(fù)制。
?4??打開https://github.com/,登陸你的賬戶,進(jìn)入設(shè)置(Settings)找到
??????
?5? 然后將你復(fù)制的內(nèi)容粘貼到key中
??????
???? 再點(diǎn)擊Add SSH Key ? ? ? ? ? ? ? ? ? ??
???? ok還有最后一步
6? 仍然在bash.exe中輸入ssh -T git@github.com然后會(huì)跳出一堆內(nèi)容你只需輸入yes回車就完事了,然后他會(huì)提示你成功了。
??? 然后你就可以正常使用git clone命令了,最后祝你好運(yùn)哈哈!
轉(zhuǎn)載于:https://www.cnblogs.com/xuLessReigns/p/10735115.html
總結(jié)
以上是生活随笔為你收集整理的Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决。...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 五个运动员参加比赛根据他们说的话判断结果
- 下一篇: 判断一个变量是不是数组