top of page

Secure Your GitHub Account: How to Enable Two-Factor Authentication (2FA)

Prefer watching instead of reading?

Watch our quick video guide below to set up GitHub two-factor authentication (2FA) and secure your account in minutes.


Don’t have an Authenticator app yet?

Download Authenticator here and start protecting your projects today.


GitHub is home to your most critical work—your code, repositories, and collaborative projects. Protecting your account is essential, and enabling GitHub 2FA is one of the best ways to keep it safe. In just a few steps, you can add an additional layer of security to prevent unauthorized access. Here’s how.


Why Enable Two-Factor Authentication on GitHub?

  1. Enhanced Security: Protect your repositories and projects by requiring a second step to log in, even if your password is compromised.

  2. Compliance and Trust: GitHub Advanced Security users benefit from having their accounts safeguarded with 2FA, demonstrating a commitment to robust security practices.

  3. Ease of Setup: Setting up 2FA with an Authenticator app takes just a few moments and significantly increases your account’s protection.

How to Set Up GitHub Two-Factor Authentication

  1. Log In and Go to Settings:Start by logging into your GitHub account. Click your profile picture in the top-right corner and select Settings from the dropdown menu.


  2. Navigate to Password and Authentication:In the left-hand menu, locate Password and Authentication and click on it.


  3. Enable 2FA:On the Password and Authentication page, click the Enable button next to Two-Factor Authentication. A QR code will appear.


  4. Open Your Authenticator App:Launch the Authenticator app on your phone. Tap the + button to add a new account and scan the QR code displayed on your GitHub screen.


  5. Enter the Generated Code:Your Authenticator app will generate a 6-digit code for GitHub. Enter this code into the designated field on GitHub before it expires.


  6. Download Recovery Codes:Don’t forget to download your recovery codes. These codes allow you to regain access to your GitHub account if you lose your phone.


Secure Your Code with Confidence

With GitHub two-factor authentication, your account is protected against unauthorized access, ensuring that your code and projects remain safe. Take a few minutes today to enable 2FA and enjoy peace of mind as you work.

1 view
bottom of page