Fork me on GitHub

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下。

 

posted @ 2019-02-01 16:25  秋夜雨巷  阅读(28820)  评论(0编辑  收藏  举报