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 if you've set one up, to regain access to your account.
In this guide
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."
- Sign in to GitHub Enterprise with your username and password.
- On the 2FA page, under "Don't have your phone?", click Enter a two-factor recovery code.
- Type one of your recovery codes, then click Verify.
Authenticating with FIDO U2F keys
If you configured two-factor authentication using FIDO U2F, you can use your U2F keys as a secondary authentication method to automatically regain access to your account. For more information, see "Using a FIDO U2F compatible security key."