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