If you've lost access to your account after enabling two-factor authentication, GitHub can't help you gain access again. Having access to your recovery codes in a secure place, or establishing a secondary mobile phone number for recovery, will get you back into your account.

Use one of your recovery codes to regain entry into your account. You may have saved these to a password manager, such as LastPass, 1Password, or Keeper.

At the bottom of the 2FA dialog, click Enter a two-factor recovery code to proceed using your code.

2FA recovery code dialog box

If you don't have access to your two-factor authentication methods or recovery codes and you've stored an account recovery token with Facebook using Recover Accounts Elsewhere, you may be able to use your token to regain access to your account. For more information, see "Authenticating with an account recovery token."

Further reading