GitHub: Enabling two-factor authentication (2FA) for added security

Updated on
January 13, 2023

Get a free security audit today

I accept the terms and conditions

Two-factor authentication (2FA) adds an extra layer of security to your GitHub account by requiring you to provide an additional authentication factor beyond your username and password. This technical reference guide will provide you with a step-by-step process to enable two-factor authentication (2FA) for added security. 

1. Enabling 2FA for your GitHub account:

  • To enable 2FA for your GitHub account, sign in to your GitHub account and navigate to the Settings page.
  • In the left sidebar, choose Security.
  • Under "Two-factor authentication," click Set up two-factor authentication.
  • Follow the on-screen instructions to enable 2FA for your GitHub account.

2. Setting up a 2FA device:

  • To set up a 2FA device, sign in to your GitHub account and navigate to the Settings page.
  • In the left sidebar, choose Security.
  • Under "Two-factor authentication," click Set up two-factor authentication.
  • Follow the on-screen instructions to set up a 2FA device.

3. Using 2FA to authenticate:

  • To use 2FA to authenticate, sign in to your GitHub account as usual.
  • After entering your username and password, you will be prompted for an authentication code.
  • Open your 2FA device and enter the code to complete the authentication process.

By following these steps, you can enable 2FA for added security in your GitHub account and protect access to your repositories and organization.

More Technical Guides

Follow along with one of our reference guides to start securing your GitHub instance