我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们
文章版本: Enterprise Server 2.15

此版本的 GitHub Enterprise 将停止服务 此版本的 GitHub Enterprise 已停止服务 2019-10-16. 即使针对重大安全问题,也不会发布补丁。 For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

错误:代理承认没有签署

在极少数情况下,在 Linux 上通过 SSH 连接 GitHub Enterprise 会产生错误“Agent admitted failure to sign using the key”(代理承认没有使用密钥签署)。 请遵循以下步骤解决此问题。

在 Linux 上尝试将通过 SSH 连接到 您的 GitHub Enterprise Server 实例 时,可能在终端上看到以下信息:

$ ssh -vT git@主机名> ...
> Agent admitted failure to sign using the key.
> debug1: No more authentication methods to try.
> Permission denied (publickey).

For more details, see this issue report.

解决方法

通过使用 ssh-add 将密钥加载到 SSH 代理,应该能够修复此错误:

# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
> Agent pid 59566
$ ssh-add
> Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]> Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)

如果密钥没有默认文件名 (/.ssh/id_rsa),必须将该路径传递到 ssh-add

# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
> Agent pid 59566
$ ssh-add ~/.ssh/my_other_key
> Enter passphrase for /home/you/.ssh/my_other_key: [tappity tap tap]> Identity added: /home/you/.ssh/my_other_key (/home/you/.ssh/my_other_key)

问问别人

找不到要找的内容?

联系我们