`

msysgit Permission denied (publickey)

    博客分类:
  • Git
阅读更多

今天用msysgit  遇到了以下问题:

 

git push origin master

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

 

由于这个版本库,一直是用netbean中git来提交,所以一直是工作正常的,

而且,msysgit 之前也安装了,也正常工作,所以,一头雾水。

怀疑了msysgit 的ssh 设置,github的设置,但检查后,都是无错。

最后,在以下文章中,找到了答案

http://www.celticwolf.com/blog/2011/02/08/git-permission-denied-publickey/

 

简而言之,是版本库的 origin 地址不对,解决方法很简单:

$ git remote rm origin
$ git remote add origin git@github.com:username/project.git

 为什么在netbean 中正常使用的库,换到 msysgit 中不正常?

估计是netbean中的git 的设置有关。与msysgit不兼容。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics