Article version: Enterprise Server 2.15

Configuring two-factor authentication recovery methods

You can set up a variety of recovery methods to access your account if you lose your two-factor authentication credentials.

In addition to securely storing your two-factor authentication recovery codes, we strongly recommend configuring one or more additional recovery methods.

In this guide

Downloading your two-factor authentication recovery codes

When you configure two-factor authentication, you'll download and save your 2FA recovery codes. If you lose access to your phone, you can authenticate to GitHub Enterprise using your recovery codes. You can also download your recovery codes at any point after enabling two-factor authentication.

To keep your account secure, don't share or distribute your recovery codes. We recommend saving them with a secure password manager, such as:

If you generate new recovery codes or disable and re-enable 2FA, the recovery codes in your security settings automatically update.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the user settings sidebar, click Security.

    Security settings sidebar

  3. Next to "Recovery codes," click Show.

    Show recovery codes button

  4. Save your recovery codes in a safe place. Your recovery codes can help you get back into your account if you lose access.

    • To save your recovery codes on your device, click Download.
    • To save a hard copy of your recovery codes, click Print.
    • To copy your recovery codes for storage in a password manager, click Copy.
      List of recovery codes with option to download, print, or copy the codes

Generating a new set of recovery codes

Once you use a recovery code to regain access to your account, it cannot be reused. If you've used all 16 recovery codes, you can generate another list of codes. Generating a new set of recovery codes will invalidate any codes you previously generated.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the user settings sidebar, click Security.

    Security settings sidebar

  3. Next to "Recovery codes," click Show.

    Show recovery codes button

  4. To create another batch of recovery codes, click Generate new recovery codes.

    Generate new recovery codes button

Configuring FIDO U2F as a fallback method

You can set up FIDO U2F as a secondary two-factor authentication method, and use your U2F keys to regain access to your account. For more information, see "Configuring two-factor authentication."

Further reading

Ask a human

Can't find what you're looking for?

Contact us