Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Error: Agent admitted failure to sign

In rare circumstances, connecting to GitHub Enterprise Server via SSH on Linux produces the error "Agent admitted failure to sign using the key". Follow these steps to resolve the problem.

When trying to SSH into your GitHub Enterprise Server instance on a Linux computer, you may see the following message in your terminal:

$ ssh -vT git@hostname
> ...
> 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.

Resolution

You should be able to fix this error by loading your keys into your SSH agent with ssh-add:

# 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)

If your key does not have the default filename (/.ssh/id_rsa), you'll have to pass that path to 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)