First, confirm you have truly lost all access
You lost your two-factor authentication credentials, GitHub has locked the account, and now your email address is stuck attached to it.
You may want that address for a fresh account, or you may be hoping unlinking will somehow get you back in.
Before you click anything, you need to know exactly what the unlink flow does and what it permanently breaks.
This guide walks through that decision using GitHub's own documentation for unlinking an email address from a locked account.
The short version: unlinking frees the email for reuse on a different account, but it does not disable 2FA and it does not give you access to the locked account.
If you cannot regain access, the link between the account and the email is permanently broken.
That is why the decision matters, and why the first step is not unlinking at all.
GitHub's documentation is explicit on this point: before continuing with unlinking, be sure you have lost all access to your account.
See the separate recovery guidance for lost 2FA credentials.
Unlinking is a one-way door, so the recovery check comes first.
What does that check look like in practice?
Work through the recovery options you still control:
- Try your saved 2FA recovery codes, if you stored them anywhere when you set up two-factor authentication.
- Use the documented recovery flow that sends a one-time password to your primary and backup email addresses. Unless you previously chose a specific backup address, all verified emails on the account count as backup addresses.
- If you linked a social account to GitHub, the documentation notes you can sign in with that social login instead of your password.
If any of these works, you are back in your account and the unlink question disappears.
If none of them works, you have confirmed the situation the unlink flow exists for.
This is also a good moment to think about your email setup going forward.
If part of what went wrong was relying on a single inbox, our guide on whether to add a backup email to GitHub walks through that decision separately.
What unlinking actually does
Here is the documented warning, nearly verbatim, because every word carries decision weight.
Following the unlink steps will not disable 2FA and will not provide access to the locked account.


