'Why does Github 2FA recovery codes fail?

I am officially blocked with 2FA! I cannot login to my Github account while I was able to do it before using one of the recovery codes. I changed my phone and the authentication app doesn't work on the new one. I used one of the codes before to login and it was successful but now none of the codes are working. I also don't have a recovery token. Does anyone have any idea what to do at this point?



Solution 1:[1]

If none of the methods described in "Recovering your account if you lose your 2FA credentials" would work (like a fallback number), then you would need to:

  • create a new GitHub account
  • contact GitHub support and see if it is possible to negotiate merging back your old account with this new one.

This situation is problematic for private repos, and GitHub does mention:

For security reasons, GitHub Support may not be able to restore access to accounts with two-factor authentication enabled if you lose your two-factor authentication credentials or lose access to your account recovery methods.

Still, only the support can tell you definitively what is possible in your case.

The OP Rubbic confirms in the comments:

I contacted github and what I ended up doing was creating a new account and they suggested that after six month they can reassign my previous email to the new account.
But I lost my previous projects and everything in it!

Lesson learned: use text message authentication, it's the easiest and safest option.

Wally adds in the comments:

Github replied after a few weeks.

The only thing they could do was to release my email and username from my account.

Solution 2:[2]

It is still possible to push through Git Bash and some other third party tools such as TortoiseGit (if those tools had been installed before you lose your 2FA credentials).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Elvin Aghammadzada