[Git]Please make sure you have the correct access rights and the repository exists

這個問題是這樣,須要在已有github帳號的A機器上,再建立一個github帳號,新帳號建立完畢,將代碼經過機器A push上以後,再另外一臺機器B,clone 這個項目時報出了以下錯誤:git

Permission denied (publickey).
fatal: Could not read from remote repository.github

解決方式是:ssh

在clone代碼的時候要使用https的形式。教程

https://github.com/accountName/projectname.git資源

 

另外,在機器A上配置兩個git帳戶,須要從新生成sshkey,而且要將這兩個github帳戶的ssh文件進行區分 id_rsa_old / id_rsa_new ,其次要經過配置文件對這兩個帳號進行配置,在使用的時候切換比較方便。rem

相似的教程,網上資源不少,多參考幾個文檔便可。 文檔

相關文章
相關標籤/搜索