权限被拒绝(publickey)。致命:远程终端意外挂起,同时推回git存储库

时间:2011-08-15 13:05:49

标签: github

  

可能重复:
  github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly

请参阅以下命令,

$ git clone git://github.com/{user_name}/{project_name}.git
Initialized empty Git repository in /home/dengx/rorBlog_demo/rorblog/.git/

更改文件并提交,所以我需要回到git存储库。

$ git push git@github.com/{user_name}/{project_name}.git master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

所以,我将存储库的ssh-key复制到我的文件〜/ .ssh / id_rsa.pub,然后再次推送,

$ git push git@github.com/{user_name}/{project_name}.git master
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

现在,我该怎么办,感谢任何帮助。

1 个答案:

答案 0 :(得分:35)

用Google搜索“权限被拒绝(公钥)。致命:远程端意外挂断”,首先得出一个确切的SO欺骗:

GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly在接受的答案中链接到这里(来自原始海报,不能少):http://help.github.com/linux-set-up-git/