38
可能重复:
github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly权限被拒绝(publickey)。致命:远程端挂机意外而推回git仓库
下面的命令,请参阅,
$ git clone git://github.com/{user_name}/{project_name}.git
Initialized empty Git repository in /home/dengx/rorBlog_demo/rorblog/.git/
更改文件并提交它,所以我需要推回到git存储库。
$ git push [email protected]/{user_name}/{project_name}.git master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
所以,我仓库的SSH密钥复制到我的文件的〜/ .ssh/id_rsa.pub,然后再推,
$ git push [email protected]/{user_name}/{project_name}.git master
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
现在,我应该怎么做,谢谢任何帮助。
我在其他本地存储库中新建了一个ssh-key,并将新的ssh-key添加到github存储库,然后再次尝试'ssh -T git @ github.com'。它告诉我这个错误'代理承认使用密钥签名失败。 权限被拒绝(公钥)。 ' – coolesting
我自己解决了这个问题,它需要将ssh-key添加到该项目的管理面板中,而不是在帐户设置中。这里是添加部署密钥的正确链接,https://github.com/ {user_name}/{project_name}/admin' – coolesting
@coolesting与这些用于帐户设置的密钥相同吗?或生成新的 – Volatil3