本人微信公众号"aeolian"~

IDEA分享项目到GitHub出现Could not read from remote repository

如果VCS->Import into Version Control->Share Project on GitHub出现如下错误::

《IDEA分享项目到GitHub出现Could not read from remote repository》

重点在最后一行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的勾去掉。

《IDEA分享项目到GitHub出现Could not read from remote repository》

方法二:

如果想用SSH, 先本机Git上执行

ssh-keygen -t rsa -C “邮箱地址”

然后一直回车,操作成功后会在,C:\Users\Administrator\.ssh目录生成id_rsa私钥和id_rsa.pub公钥

《IDEA分享项目到GitHub出现Could not read from remote repository》

在github上将生成的ssh的public key(id_rsa.pub中的内容)粘到个人账户的setting>SSH and GPG keys > New SSH key下。

《IDEA分享项目到GitHub出现Could not read from remote repository》

 

点赞

Leave a Reply

Your email address will not be published. Required fields are marked *