# SSH 故障排除

使用 SSH 进行连接和身份验证 GitHub时，可能需要解决可能出现的意外问题。

## Links

* [/using-ssh-over-the-https-port](/zh/enterprise-server@3.22/using-ssh-over-the-https-port)

* [恢复 SSH 密钥密码](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase)

  如果您丢失 SSH 密钥密码，则根据您使用的操作系统，您可能可以恢复它，也可能需要生成新的 SSH 密钥密码。

* [/deleted-or-missing-ssh-keys](/zh/enterprise-server@3.22/deleted-or-missing-ssh-keys)

* [/error-host-key-verification-failed](/zh/enterprise-server@3.22/error-host-key-verification-failed)

* [错误：权限被拒绝（公钥）](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-permission-denied-publickey)

  “权限被拒绝”错误表示服务器拒绝了您的连接。 可能有多个原因，最常见的如下所述。

* [错误：文件编号错误](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-bad-file-number)

  此错误通常表示您无法连接到服务器。 这通常由防火墙和代理服务器造成。

* [错误：密钥已被使用](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-key-already-in-use)

  尝试添加已添加到其他帐户或存储库的密钥时，会发生此错误。

* [错误：用户/仓库拒绝其他用户的权限](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-permission-to-userrepo-denied-to-other-user)

  此错误意味着您使用的密钥绑定到一个没有仓库访问权限的账户。

* [错误：用户/仓库拒绝用户/其他仓库的权限](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-permission-to-userrepo-denied-to-userother-repo)

  此错误意味着您正在推送的密钥作为 deploy key 附加到另一个仓库，并且对您尝试推送到的仓库的没有访问权限。

* [错误：代理承认没有签署](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign)

  在极少数情况下，通过 SSH 在 Linux 上连接到 GitHub 会产生错误 "Agent admitted failure to sign using the key"。 请遵循以下步骤解决此问题。

* [错误：ssh-add：非法选项 -- apple-use-keychain](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-ssh-add-illegal-option----apple-use-keychain)

  此错误意味着你的 ssh-add 版本不支持 macOS 密钥链集成，此集成允许你将密码存储在密钥链中。

* [/error-ssl-certificate-problem-verify-that-the-ca-cert-is-ok](/zh/enterprise-server@3.22/error-ssl-certificate-problem-verify-that-the-ca-cert-is-ok)

* [错误：未知密钥类型](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-unknown-key-type)

  此错误表示您使用的 SSH 密钥类型无法识别或不受 SSH 客户端支持。

* [错误：我们正在进行 SSH 密钥审核](/zh/enterprise-server@3.22/authentication/troubleshooting-ssh/error-were-doing-an-ssh-key-audit)

  此错误意味着无法验证正在用于执行 Git 操作的 SSH 密钥。