Mandatory Github 2FA before May 2 2026 #191012
-
🏷️ Discussion TypeQuestion 💬 Feature/Topic AreaSecurity and Privacy BodyHi @everyone, Now that GitHub will require 2FA before May 2, 2026. I have a problem with this. I am from Kenya and SMS verification is not supported for the 2FA. The other option is using an authenticator app by scanning a QR code. But what if someone doesn’t have a smartphone? Not everyone can install apps like Google Authenticator. Some people only have basic phones or use shared devices. So I am wondering: Is there any other way to enable 2FA without a smartphone? I feel like this might lock some of us out of our accounts. Any help or advice would be appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
Hi @mik284, this is a completely valid concern, and you're not alone — many developers in Kenya and other unsupported countries face the same issue. The good news is that you have several options that don't require a smartphone. Here's a complete guide: Option 1: Desktop Authenticator Apps (No Smartphone Needed)You can install a TOTP authenticator app directly on your computer. These work exactly like Google Authenticator but run on Windows, Mac, or Linux:
How to set up:
Option 2: Hardware Security Key (Most Secure)A physical security key like a YubiKey is a small USB device that generates codes without any phone or computer app [citation:2]. How it works:
Where to buy (ships to Kenya):
These are phishing-resistant and work offline — many developers consider them the gold standard for 2FA [citation:2]. Option 3: Backup Codes (Free, No Device Needed)When you set up 2FA, GitHub gives you 16 one-time backup codes [citation:3]. These work without any app or phone. What to do:
Important: Each code works only once, but you can generate new codes anytime [citation:3]. Summary Table
My Recommendation for YouSince you're in Kenya and don't have a smartphone:
Important: Save Backup Codes First!Whatever method you choose, save your recovery codes during setup [citation:10]. Write them down on paper and keep them somewhere safe. If you ever lose access to your authenticator, these codes are the only way back into your account. You won't be locked out — there are always alternatives! |
Beta Was this translation helpful? Give feedback.
-
|
Probably I don't think you actually need a smartphone for GitHub 2FA GitHub’s two-factor authentication is based on TOTP (Time-based One-Time Passwords), which isn’t limited to mobile apps. You can generate these codes on a regular computer as well. Here are a few workable options:
You can install an authenticator directly on your PC (for example, WinAuth, Authy Desktop, or password managers like 1Password).
There are browser extensions that generate TOTP codes inside Chrome/Firefox. These work similarly to mobile authenticators and don’t require any phone.
If you prefer a physical device, you can use a USB security key such as a YubiKey. You just plug it in when logging in and tap it to confirm. This is usually the most secure option.
If you’re comfortable with scripting, you can generate TOTP codes using Python and the pyotp library. This works using the same setup key GitHub provides during configuration.
When enabling 2FA, GitHub gives you recovery codes. Store them safely—these let you log in even if you lose access to your authenticator. |
Beta Was this translation helpful? Give feedback.
-
|
Hey there! We know 2FA may be a new process for some folks and with that comes questions. We put together a FAQ that will help answer your concerns above. If you still have more questions, feel free to ask them here. |
Beta Was this translation helpful? Give feedback.
-
Enabling GitHub 2FA without a smartphoneGitHub’s upcoming requirement (effective May 2 2026) means every account must have a second factor. If you can’t use SMS or a mobile authenticator app, you still have several reliable options that work from a basic computer or with a low‑cost hardware token. 1. Use a desktop‑based TOTP authenticatorA Time‑Based One‑Time Password (TOTP) app does not need a smartphone; many run on Windows, macOS, or Linux.
Setup steps
2. Register a hardware security key (U2F/WebAuthn)A FIDO2/U2F security key (YubiKey, Google Titan, SoloKeys, etc.) works via USB, NFC, or Bluetooth and needs no phone. How to add a key
You can register multiple keys; keep one as a backup in a safe place.
3. Rely on backup codes for recoveryIf you lose access to your TOTP app or security key, the backup codes let you log in once each.
4. Test your setupAfter enabling 2FA, verify that you can still authenticate: # Using SSH (if you have an SSH key set up)
ssh -T git@github.com
# You should see: Hi <username>! You've successfully authenticated...
# Using GitHub CLI (requires gh >= 2.0)
gh auth login # choose "Login with a web browser" → complete 2FA promptIf either command succeeds, your 2FA method is working. 5. What to do if you truly have no device at all
Quick checklist
By using a desktop TOTP program or a hardware security key, you can satisfy GitHub’s 2FA mandate without needing a smartphone or SMS capability. These methods are officially supported, widely tested, and provide the same level of protection as mobile‑based authenticators. Further reading
Feel free to ask if you need clarification on any of the steps! |
Beta Was this translation helpful? Give feedback.
Enabling GitHub 2FA without a smartphone
GitHub’s upcoming requirement (effective May 2 2026) means every account must have a second factor. If you can’t use SMS or a mobile authenticator app, you still have several reliable options that work from a basic computer or with a low‑cost hardware token.
1. Use a desktop‑based TOTP authenticator
A Time‑Based One‑Time Password (TOTP) app does not need a smartphone; many run on Windows, macOS, or Linux.