【问题标题】:Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git repository [duplicate]权限被拒绝(公钥)。致命:远程端在推回 git 存储库时意外挂断 [重复]
【发布时间】:2011-10-27 06:33:39
【问题描述】:

可能重复:
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

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

【问题讨论】:

    标签: github


    【解决方案1】:

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

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

    【讨论】:

    • 我在其他本地仓库中新建了一个 ssh-key,并将新的 ssh-key 添加到 github 仓库,然后再试一次ssh -T git@github.com。它告诉我这个错误Agent admitted failure to sign using the key. Permission denied (publickey).
    • 我自己解决了这个问题,它需要将 ssh-key 添加到该项目的管理面板,而不是在帐户设置中。这是添加部署密钥的正确链接,https://github.com/{user_name}/{project_name}/admin
    • @coolesting 这些与帐户设置相同的密钥吗?或生成新的
    • 您可以使用 url:github.com/<username>/<repo-name>/settings/keys 将您的公钥部署到 github
    • @johnny : 有没有办法删除公钥/ ssh 并恢复正常的 https 端口
    猜你喜欢
    • 2013-07-07
    • 2011-04-06
    • 2017-09-30
    • 1970-01-01
    • 2011-10-12
    • 2014-02-10
    • 2018-08-24
    • 2013-11-28
    • 1970-01-01
    相关资源
    最近更新 更多