Skip to main content

Recovering your account if you lose your 2FA credentials

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.

Using a two-factor authentication recovery code

Use one of your recovery codes to automatically regain entry into your account. You may have saved your recovery codes to a password manager or your computer's downloads folder. The default filename for recovery codes is github-recovery-codes.txt. For more information about recovery codes, see "Configuring two-factor authentication recovery methods."

  1. Type your username and password to prompt authentication.

    Warning: 2 要素認証で個人アカウントを保護してもパスワードがわからない場合は、次の手順に従ってアカウントを回復することはできません。 GitHub は、アカウントに関連付けられている確認済みのアドレスにパスワード リセットの電子メールを送信できます。 詳細については、「GitHub のアクセス資格情報の更新」を参照してください。

  2. On the 2FA page, under "Don't have your phone?", click Enter a two-factor recovery code.

    Screenshot of link to use a recovery code

  3. Type one of your recovery codes, then click Verify.

    Field to type a recovery code and Verify button

Authenticating with a security key

If you configured two-factor authentication using a security key, you can use your security key as a secondary authentication method to automatically regain access to your account. For more information, see "Configuring two-factor authentication."