Create Account

GitHub Account Recovery: Lost 2FA or Password

Posted on 16/11/26 01:05 pm

Reset a GitHub password by email. Lost two-factor access? Use a recovery code, a passkey or security key, or start account recovery with an SSH key or token.

Forgot password

  1. Go to the GitHub sign-in page and choose Forgot password?
  2. Enter your email.
  3. Follow the reset link.

Lost two-factor device

OptionWhat you need
Recovery codesOne of the codes saved when you set up 2FA
Passkey or security keyA registered key or device
Fallback SMSIf you added a fallback number
GitHub MobileIf you signed in to the app before

Account recovery request

If none of those work, GitHub offers an account recovery request. It verifies you with something only the owner should have, such as:

  • An SSH key added to the account.
  • A personal access token.
  • A device you used to sign in before.
  • A verified email address.

GitHub reviews requests, which can take several days. Support cannot simply turn off two-factor without verification.

Hacked account

  1. Reset your password.
  2. Review sessions and sign out unknown ones.
  3. Check SSH keys, tokens, OAuth apps and webhooks.
  4. Look for new repositories or changed code.
  5. Contact GitHub support.

Organisations

Organisation owners can remove a locked-out member and invite them again after recovery. They cannot reset your personal two-factor.

Prevent it

  • Download recovery codes and store them outside GitHub.
  • Add two methods, such as an app and a security key.
  • Keep a verified backup email.

SSH keys as proof

GitHub can use a registered SSH key or a personal access token from a computer you still have to help verify you during recovery. Check your machines for keys you added before contacting support.

See GitHub two-factor authentication and GitHub rate limits.

Signed in somewhere already?

If GitHub Desktop, an IDE or the GitHub CLI is still signed in on one of your computers, that session can help. You may be able to download new recovery codes or add a new two-factor method from a browser that is still logged in. Check every device before starting a formal recovery request, which takes longer.

Email access

Recovery messages go to verified emails on the account. Keep at least two verified addresses, including one that is not a work email you could lose when changing jobs.

FAQ

How do I recover GitHub without 2FA?

Use recovery codes, a passkey, or an account recovery request.

Can GitHub support turn off my 2FA?

Only after verifying you through recovery.

What proves I own a GitHub account?

SSH keys, tokens, verified emails or known devices.

Related: GitHub 2FA · GitHub rate limits · GitHub account suspended.

Back to Blog

Recent Posts