Lost access to my Github account and no access to 2FA methods or recovery codes (However my local devices still can communicate with my account's repositories) #168587
-
Github 2FALost access to my Github account and no access to 2FA methods or recovery codes (However my local devices still can communicate with my account's repositories) BodyMy account named aryanargupta is somehow locked out. It has been a while I used it for my local work (about 5-6 months). In the mean time I had switched my phone as well (and had reset the old phone before exchanging). Now, it appears that I have lost all access to my github account. I tried deep searching my local laptop, but couldn't find any recovery codes, nor do I remember of setting up an authenticator app fo it. The only 2FA (which I had set up long back 3 years prior from now I believe) I had setup was Github mobile, and I have lost access to it since I changed my phone. My linux as well as windows OS are still connected with my repository with the personal access tokens (but none of them has that admin scope for generating other access tokens). So I can keep pulling and pushing code, but can't see the interface online on my browser. I really have some important work right now to do, and I can't even raise a ticket because it shows "Cannot verify this device" and the SSH token and PAT token options are just greyed out. I can't even raise a ticket to provide some old PAT and prove my access to my personal email account as well as the backup account. I have the access to my phone number but I don't even think I linked it in first place. The funny thing is this account with which I am writing this post, had no 2FA, and I could simply recover this via my email (And this is even older than my main account, I had just created this some 4-5 years back for fun when I didn't know anything of git/github). 2FA is indeed a curse. But I look for someone who can lift this curse off me, or guide me on contacting github support for this. Idk how, but please help me guys if possible. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 3 replies
-
|
Hi @Aryang22, I recommend you contact support with this account by opening a ticket here, under Account select " |
Beta Was this translation helpful? Give feedback.
-
|
Hey @Aryang22 , First off, I totally get how stressful this must feel, especially with urgent work on your plate. You’re definitely not alone—this sort of situation happens more often than people realize, and there are a couple of things you can try right now: You need to contact GitHub Support directly. In the email, clearly explain your situation, including: Your GitHub username (aryanargupta). The fact you’ve lost access to your 2FA device and recovery codes. That your local machines can still push and pull code using existing tokens, proving some level of account ownership. Mention you still have access to the primary email tied to the account. Gather proofs of ownership. Screenshots of recent terminal commands showing successful pushes/pulls to your private repos. Details about your last few commits (timestamps, commit hashes) from your local repo. Any other billing receipts, if you had a paid plan on that account. Keep using your local access cautiously. About support verification issues. Consider your email and security hygiene. Unfortunately, there’s no instant or guaranteed fix—GitHub Support has to manually review your case, and they might take a few days depending on their backlog. But as long as you reach out from your registered email with clear proof of ownership, they usually help you regain access or disable 2FA. Hang in there, and don’t hesitate to update here if you get stuck along the way. Good luck—I hope you get back into your account soon! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Aryang22 👋 I can understand how frustrating it is to lose access to your GitHub account, especially when you still have local access but can’t get past 2FA on the web. Unfortunately, no one in the community (including moderators) can directly reset or bypass your 2FA — this can only be done securely through GitHub Support. Here’s what you can do: Check for recovery codes If you saved your 2FA recovery codes when you set up GitHub Mobile, those are the fastest way back in. Verify with existing sessions Since you mentioned your local machines can still pull/push, check if you still have an active browser session on any device. If yes, you can update your 2FA settings or generate new recovery codes from there. Account recovery request If no recovery codes or active sessions are available, the only option is to submit an account recovery request to GitHub: Provide as much information as possible (username, linked emails, repositories you own, billing details if any). This helps the Support team verify ownership. Important note Even though you can still push and pull via PAT or SSH, GitHub cannot treat that as account ownership proof for 2FA reset. You’ll need to go through Support verification. Don’t share personal details (like email/phone numbers) here — only provide those securely via the Support form. I know this process takes time, but GitHub Support is the only secure way to recover access. In the meantime, since your repos are accessible locally, you can continue your work, and once you regain account access, sync everything back up. Hope this helps 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
If you’ve lost access to your GitHub account due to 2FA (Two-Factor Authentication) issues, here’s what you can do: 1. Check for Recovery Options
2. Use Personal Access Tokens (PAT)
3. Contact GitHub Support
4. Provide Strong ProofWhen raising a ticket, include:
5. Last ResortIf recovery codes and 2FA devices are lost, GitHub Support is the only way to regain access. They will manually verify your ownership and disable/reset 2FA for your account.
|
Beta Was this translation helpful? Give feedback.
-
✅ What You Can Try Right Now
📩 Draft Message to GitHub SupportYou can paste this in the support form (just tweak your details): Subject: Locked out of my GitHub account due to 2FA Hi GitHub Support, My account @aryanargupta is locked due to 2FA. I had GitHub Mobile set up as the only 2FA method on an old phone that I no longer have. I do not have recovery codes or backup methods available. However, I can still access my repositories locally using personal access tokens from my Linux and Windows devices (though these tokens don’t have admin scope). I can provide proof of ownership by:
Please help me reset 2FA or recover my account so I can access the web interface and manage my repositories again. Thank you for your support. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, no one in the community (or even moderators) can disable 2FA for you — only GitHub Support can do that after verifying ownership. Since you’ve lost your 2FA device and recovery codes, here’s what you can do: Check for active sessions Use your local proof Submit an account recovery request – Provide your username (aryanargupta), the email tied to the account, and any proofs of ownership. Until Support resets 2FA, you can keep coding locally and pushing with your existing tokens, but the only way back into the web interface is through their recovery process. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Aryang22 👋 If you’ve lost access to your two-factor authentication (2FA) credentials, you can regain access to your account by using your recovery codes or another recovery option. Please visit GitHub’s Virtual Assistant to explore your available options. If GitHub doesn’t support 2FA via text message in your country, you’ll need to set up authentication using a TOTP application. For more information on configuring 2FA with a TOTP app, here is the documentation. I highly recommend you read through our GitHub 2FA Troubleshooting & Prevention Guide 🔐 or visit our FAQ if you have additional questions. If you’re unable to resolve your issue with the resources above, please open a ticket in our Support Portal as no other Community Discussions team members will be able to assist with account-related questions. We appreciate your understanding! |
Beta Was this translation helpful? Give feedback.
-
|
Since you’ve lost access to your 2FA and recovery codes but still have local devices authenticated, here’s what you should do: Open a support ticket with GitHub at GitHub Support In your ticket, provide proof of account ownership like: repository names, commit hashes, billing info (if any), or details of your activity. Keep your local device sessions active so you don’t lose push/pull access until GitHub restores your account. Do you want me to draft a ready-to-send message to GitHub Support that includes all the details they usually require for faster recovery? |
Beta Was this translation helpful? Give feedback.
-
|
Got the access back to my account! And it was not easy to be frank. Patience was the key. I waited 1 month without any reply from the github support team. Was almost going to lose hope and start unlinking my account, when I saw a ray of hope. Mark from their team asked me to reach out from my original email on the support email and have that ticket in the quoted text (otherwise you would simply receive a reply that the support email doesn't work anymore). It exists, that means there's someone reviewing the emails sent. And this time my main account's email got added in CC in the same ticket. On confirmation from my main account, Mark shared info on different logins and 2FA methods (or attempts to set them up) with timeline. And, somehow, only 1 particular browser, among my whole 2 OS'es, consisting of 6-7 browser sessions in total, could have that "verify with this device" option not greyed out. Clicking that, I got a link to disable 2FA temporarily (works for 72 hours only). And the moment I logged back into my account, immediately I set up each and every authentication method, to avoid such a scenario in future. And finally took a sigh of relief. Finally, I decided to come here where it started from. And I want to thank everyone in this discussion and in the community who were driven to help me in this unfortunate situation! And for the last treat, I will come from my main account and comment here lol. Important Note: Even commits to private repositories, or the ability of a PAT to create or delete repos, doesn't work as an ownership proof unless the PAT has full admin access. It's not a valid proof! |
Beta Was this translation helpful? Give feedback.
-
|
Hello guys! :) |
Beta Was this translation helpful? Give feedback.
-
|
Github, has become a thorn in the flesh, I opened account 2fa locked out ticket with github and after 2months of waiting , see their reaction My work is urgent to me , i have appealed in every way possible and told them the reason behind my lockout was due to a failed SSD which removed all i saved earlier and used for github Here is my github support ticket and the worst aspect is no relevant response has been given to me since , because I only got messages of I am on the waiting queue All the feedback is a lie here I never had any responses, this was the only response after a month and 3weeks of waiting , and the worst aspect the person went ahead to close the ticket without any form of remorse I had asked github to help me download my repositories on their platform and send to my email or something as a last option , but it seems the platform is something of dark and sinister or strangely evil because they aka github don't have any right to hold any developers code , its almost like a bank saying you can not remove your money from your account assuming you lost some passkey to authenticate , but definitely the bank must give you your money if you prove with ownership you own that account Github return my work to me , I want all my work from your platform and its a shame github has stooped this low, this is why many developer and people are not abandoning github for safer and more efficient git platforms |
Beta Was this translation helpful? Give feedback.

Hey @Aryang22 ,
First off, I totally get how stressful this must feel, especially with urgent work on your plate. You’re definitely not alone—this sort of situation happens more often than people realize, and there are a couple of things you can try right now:
You need to contact GitHub Support directly.
Since you can’t log in to the account to raise a ticket from the usual support form, you should send an email from your registered email address (the one tied to your locked-out GitHub account) to support@github.com.
In the email, clearly explain your situation, including:
Your GitHub username (aryanargupta).
The fact you’ve lost access to your 2FA device and recovery codes.
That your loc…