How to enable Two-Factor Authentication for GitHub

How to enable Two-Factor Authentication for GitHub

Kevin Archer picture by Kevin Archer·Updated 01 Oct 2024·5 minutes to read

1

Download Authenticator App

  • Before we start, download GitHub Authenticator App by searching for it in your Apple device's App Store or click on the button below Download on the App Store

    iOS Apple App Badge

2

Locate 2FA Settings

  • Sign in to your GitHub account and click Settings from the drop-down menu next to your profile picture in the upper right corner.

    Locate 2FA Settings
3

Enable Two-Factor Authentication

  • Go across to Password and authentication scroll down to Two-factor authentication and then click on Enable two-factor authentication

    Enable Two-Factor Authentication
4

Next Step

  • Select Set up using an app and click Continue.

    Next Step
5

Set up Two-Factor Authentication

  • In this step is shown the QR Code that contains the secret key which you need to scan with Authenticator App. Keep this page open as you reach for your device.
    Note: Do not scan the demo image shown below.

    Set up Two-Factor Authentication
6

Capture QR Code

  • Open Authenticator App, tap the plus add new Item button, and hold your device up to the computer screen to scan the QR Code from GitHub web page.

    Capture QR Code
7

Verification code

  • After successfully scanning the QR Code, Authenticator App will automatically choose the GitHub logo and autofill the account name and secret key. Click on Save when ready.
    Tip: You can choose the account icon by pressing on add new icon icon

    Verification code
8

Confirm OTP code

  • Returning to the Github, type in the six digit code from Authenticator App in the appropriate field. When done click Continue.

    Confirm OTP code
9

Save Your Recovery Codes

  • You'll now be displayed a list of recovery codes. These are used to gain access to your account in the event you lose access to your phone so you can either download them to your device, save in Authenticator App or store them somewhere safe. One you've done that click I have saved my recovery codes to enable two-factor authentication.

    Save Your Recovery Codes
10

Done!

  • You have successfully enabled two-factor authentication(2FA) to protect your GitHub account, from now on, you will need to use the Authenticator App when you would like to log in to your GitHub account. GitHub recommends you test it by signing out and signing back in using two-factor authentication, so in case of problems, you can use recovery codes to access your account and correct the problem.

    Done!

You're all set! You've enabled Two-Factor Authentication (2FA) for your GitHub account. To learn more, visit the GitHub support page. Stay safe!

Was this article helpful?

👍 Yes
No

More on this

Here are some more articles you might like to read next: