IDEA分享項目到GitHub出現Could not read from remote repository


如果VCS->Import into Version Control->Share Project on GitHub出現如下錯誤::

重點在最后一行Could not read from remote repository,意思是沒有權限讀取。

Can't finish GitHub sharing process
Successfully created project 'OCRDiscern' on GitHub, but initial push failed:
Could not read from remote repository.

解決方案

方法一:

點擊Setting-》Version Control-》GitHub,將Clone git repositories using ssh的勾去掉。

方法二:

如果想用SSH, 先本機Git上執行

ssh-keygen -t rsa -C "郵箱地址"

然后一直回車,操作成功后會在,C:\Users\Administrator\.ssh目錄生成id_rsa私鑰和id_rsa.pub公鑰

在github上將生成的ssh的public key(id_rsa.pub中的內容)粘到個人賬戶的setting>SSH and GPG keys > New SSH key下。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM