Skip to main content
Available for iOS, Android, Apple Watch, and zero-network Chrome & Edge extensions. Get the app
Authenticator 2FA
GH Standard TOTP 2FA Guide

How to Set Up GitHub 2FA with Authenticator

GitHub requires two-factor authentication for code contributors. Set up offline TOTP codes in under two minutes.

Where to find the setting

GitHub → Settings → Password and authentication → Two-factor authentication

Step-by-step GitHub 2FA setup

  1. 1

    Open GitHub security settings

    Sign in to GitHub, click your avatar in the top-right corner, select Settings, then open Password and authentication.

  2. 2

    Choose Authenticator app

    Click Enable two-factor authentication (or Add Authenticator app) to display your QR code and manual setup key.

  3. 3

    Scan or enter the key in Authenticator

    Open Authenticator on iOS, Android, or the Chrome/Edge extension, scan the QR code or paste the setup key, and verify the 6-digit code back on GitHub.

  4. 4

    Save your 16 recovery codes

    Download GitHub’s 16 single-use recovery codes and keep them somewhere separate from your device.

Troubleshooting & tips

  • Enable automatic date and time on your phone or computer if GitHub rejects your 6-digit code.
  • Wait for the 30-second countdown to refresh if fewer than 5 seconds remain.
  • Remember GitHub 2FA is distinct from SSH keys and personal access tokens.

GitHub 2FA FAQ

Can I use Authenticator offline for GitHub 2FA?

Yes. GitHub uses standard RFC 6238 TOTP codes, so Authenticator generates valid codes completely offline.

What if I lose my device with GitHub 2FA?

Use one of the 16 GitHub recovery codes you saved during setup, or restore your encrypted .authvault / cloud backup in Authenticator.

Protect your GitHub account offline

AES-256-GCM local vault on iOS, Android, Apple Watch, and zero-network Chrome & Edge extensions.

Get Authenticator

More 2FA setup guides

All guides →