# エラー: エージェントが署名の失敗を認めた

まれに、Linux 上の SSH 経由で GitHub に接続すると、エラー "Agent admitted failure to sign using the key" が発生します。 この問題を解決するには以下の手順に従ってください。

Linux コンピューターで お使いの GitHub Enterprise Server インスタンス に SSH 接続しようとすると、ターミナルに以下のメッセージが表示されることがあります。

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

詳細については、Canonical Launchpad の[この問題のレポート](https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/201786)を参照してください。

## 解像度

`ssh-add` を使用してキーを SSH エージェントに読み込ませることでこのエラーを修正できます。

```shell
# 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` に渡す必要があります。

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