Posted on 09/11/26 03:13 pm
GitHub 2FA protects your account with an app, passkey, security key or SMS. It is required for many code contributors; recovery codes are your safety net.
| Method | Notes |
|---|---|
| Authenticator app (TOTP) | The usual first choice |
| Passkey or security key | Strongest; resists phishing |
| GitHub Mobile | Approve sign-ins from the app |
| SMS | Available in some countries; less secure |
GitHub has been requiring 2FA for accounts that contribute code, with notices and a deadline in your account. Organisations can also require it for members.
Store recovery codes in a password manager, not only on the same phone as the authenticator.
"Too many requests" errors on GitHub are about API rate limits, not 2FA.
2FA protects sign-ins on the website. Git operations over HTTPS use personal access tokens instead of your password, and SSH keys work as before. If your scripts fail after turning on 2FA, create a token with the scopes you need and use it in place of the password.
An organisation can require 2FA for every member. Members without it may be removed until they turn it on, so set it up before a deadline to keep your access to repositories.
Add two methods if you can, for example an authenticator app and a security key. Losing one then does not lock you out, and you avoid the slow recovery process.
For many accounts that contribute code, yes.
Use a recovery code or another 2FA method.
In some countries, but an app or passkey is safer.
Related: GitLab two-factor codes · passkeys · lost authenticator.
Receive SMS online · Non-VoIP numbers · Temporary phone numbers · Free numbers