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

丢失 2FA 凭据时恢复帐户

If you lose access to your two-factor authentication credentials, you can use your recovery codes, or another recovery option, to regain access to your account.

本文内容

警告:出于安全原因,如果您丢失了双重身份验证的凭据或无法访问您的帐户恢复方法,GitHub 支持人员可能无法帮助您恢复访问启用了双重身份验证的帐户。

使用双因素身份验证恢复代码

使用您的恢复代码之一自动重新进入您的帐户。 您可能已将恢复代码保存到密码管理器或计算机的下载文件夹中。 恢复代码的默认文件名为 github-recovery-codes.txt。 有关恢复代码的更多信息,请参阅“配置双因素身份验证恢复方法”。

  1. 输入您的用户名和密码以提示身份验证。

  2. Under "Having Problems?", click Enter a two-factor recovery code.

    Link to use a recovery code

  3. 输入恢复代码之一,然后单击 Verify(验证)

    输入恢复代码的字段和验证按钮

使用后备号码进行身份验证

如果无法访问主要 TOTP 应用程序或电话号码,则可以提供发送到后备号码的双因素身份验证码,以自动重新获得对帐户的访问权限。

使用安全密钥进行身份验证

如果您使用安全密钥配置双重身份验证,则可以使用安全密钥作为辅助身份验证方法来自动重新获得对帐户的访问权限。 更多信息请参阅“配置双重身份验证”。

Authenticating with a verified device, SSH token, or personal access token

If you lose access to the two-factor authentication credentials and don't have your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account.

Note: For security reasons, regaining access to your account by authenticating with a one-time password can take 3-5 business days. Additional requests submitted during this time will not be reviewed.

You can use your two-factor authentication credentials or two-factor authentication recovery codes to regain access to your account anytime during the 3-5 day waiting period.

  1. 输入您的用户名和密码以提示身份验证。

  2. Under "Having Problems?", click Can't access your two factor device or valid recovery codes?

    Link if you don't have your 2fa device or recovery codes

  3. Click I understand, get started to request a reset of your authentication settings.

    Reset authentication settings button

  4. Click Send one-time password to send a one-time password to all email addresses associated with your account.

    Send one-time password button

  5. Under "One-time password", type the temporary password from the recovery email GitHub sent.

    One-time password field

  6. Click Verify email address.

  7. Choose an alternative verification factor.

    • If you've used your current device to log into this account before and would like to use the device for verification, click Verify this device.
    • If you've previously set up an SSH key on this account and would like to use the SSH key for verification, click SSH key.
    • If you've previously set up a personal access token and would like to use the personal access token for verification, click Personal access token.
      Alternative verification buttons
  8. A member of GitHub 支持 will review your request and email you within 3-5 business days. If your request is approved, you'll receive a link to complete your account recovery process. If your request is denied, the email will include a way to contact support with any additional questions.

使用帐户恢复令牌进行身份验证

如果无法访问 GitHub 帐户的双因素身份验证方法,您可以从合作伙伴的恢复提供程序提取帐户恢复令牌,并请求 GitHub 支持人员进行审查。

如果您无法访问双因素身份验证方法或恢复代码,并且已通过 Facebook 使用“异地恢复帐户”存储帐户恢复令牌,则可以使用您的令牌重新获得对帐户的访问权限。

If you're unable to regain access to your account, generate a one-time password to regain access. For more information, see "Authenticating with a verified device, SSH token, or personal access token."

警告:

  1. 在 Facebook 中,导航到 Security Settings(安全设置),然后单击 Recover Accounts Elsewhere(异地恢复帐户)
    含有异地恢复帐户链接的 Facebook 安全设置页面
  2. 单击与您的 GitHub 帐户关联的恢复令牌。
    Facebook 中存储的恢复令牌列表
  3. 要取回帐户恢复令牌,请单击 Recover This Account(恢复此帐户)。 此时将打开一个新窗口,将您返回到 GitHub。
    含有恢复令牌相关信息的模态框和恢复此帐户按钮
  4. 联系 GitHub 支持GitHub 高级支持,告知他们您的帐户恢复令牌已准备好进行审查。

延伸阅读

问问别人

找不到要找的内容?

联系我们