Add your GitHub.com or GitHub Enterprise account information to GitHub Desktop so you can access your repositories. If you have two-factor authentication enabled, you'll be asked to provide a 2FA code along with your password when you sign in to GitHub Desktop.

Before you authenticate, you must already have a GitHub or GitHub Enterprise account.

  • For more information on creating a GitHub account, see "Signing up for a new GitHub account".
  • For a GitHub Enterprise account, contact your GitHub Enterprise site administrator.
  1. In the upper-left corner of your screen, select the GitHub Desktop menu. The GitHub Desktop menu in the Mac menu bar

  2. Click Preferences. The Preferences value in the GitHub Desktop drop-down menu

  3. In the Preferences window, select Accounts. The Accounts pane in the Preferences window

  4. In the Accounts pane, do one of the following:

    • To authenticate to GitHub, under "GitHub.com" click Sign In.
    • To authenticate to GitHub Enterprise, under "GitHub Enterprise" click Sign In.
  5. To add a GitHub Enterprise account, type your credentials under "Enterprise server address," then click Continue. The Sign In button for GitHub Enterprise

  6. To add a GitHub account, type your GitHub.com credentials and click Sign in. The Sign In button for GitHub
  7. If you have configured two-factor authentication for GitHub or GitHub Enterprise, do one of the following:

    • If you set up 2FA via SMS, retrieve your 2FA code from an SMS message.
    • If you set up 2FA with a TOTP application, generate a 2FA code.
  8. Return to GitHub Desktop. In the prompt, enter your 2FA code, then click Sign in. The 2FA code prompt

  1. In the upper-left corner of the window, select the File menu. The GitHub Desktop menu in the windows menu bar

  2. Click Options. The Options value in the Settings drop-down menu

  3. In the Options window, select Accounts. The Accounts pane in the Options window

  4. In the Accounts pane, do one of the following:

    • To authenticate to GitHub, under "GitHub.com" click Sign In.
    • To authenticate to GitHub Enterprise, under "GitHub Enterprise" click Sign In.
  5. To add a GitHub Enterprise account, type your credentials under "Enterprise server address," then click Continue. The Sign In button for GitHub Enterprise

  6. To add a GitHub account, type your GitHub.com credentials and click Sign in. The Sign In button for GitHub
  7. If you have configured two-factor authentication for GitHub or GitHub Enterprise, do one of the following:

    • If you set up 2FA via SMS, retrieve your 2FA code from an SMS message.
    • If you set up 2FA with a TOTP application, generate a 2FA code.
  8. Return to GitHub Desktop. In the prompt, enter your 2FA code, then click Sign in. The 2FA code prompt