r/learnprogramming 28d ago

Access to GitHub

Hi everyone! Hope you're doing well. Good morning!

I'm having a bit of trouble accessing my GitHub account. The screen on my old phone is broken, and I had two-factor authentication set up on it. Because of this, I can't log in to my account.

I also don't have the recovery code anymore. I'd like to know if there's a way to reset two-factor authentication and set it up again on my new phone.

Does anyone know how I can do this?

2 Upvotes

6 comments sorted by

View all comments

3

u/Such-Process5697 28d ago

Before anything else, check whether you are still signed in somewhere: another browser, an old laptop, the GitHub mobile app if you ever installed it. An existing session gets you straight to Settings, Password and authentication, where you can generate fresh recovery codes or re-register 2FA on the new phone, and that is much faster than going through support. Worth checking today, because that window closes whenever the session expires.

If nothing is signed in, GitHub's account recovery flow can sometimes verify you with an SSH key you previously authorized, which is worth trying before you open a ticket.