👋 We've unified all of GitHub's product documentation in one place! Check out the content for REST API, GraphQL API, and Developers. Learn more on the GitHub blog.

Authenticating to GitHub

Connect your GitHub account to GitHub Desktop.

In this article

Were you able to find what you were looking for?

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.

Authenticating to GitHub using the browser

  1. In the upper-left corner of your screen, select the GitHub Desktop menu, then click Preferences.

    The Preferences value in the GitHub Desktop drop-down menu

  2. In the Preferences window, select Accounts.

    The Accounts pane in the Preferences window

  3. To the right of "GitHub," click Sign In.

    The Sign In button for GitHub

  4. In the Sign in pane, click Sign in using your browser.

    The Sign in using your browser link

  5. To authenticate to GitHub, type your GitHub.com credentials and click Sign in.

    The Sign In button for GitHub in browser

    Alternatively, if you were already logged in to GitHub, follow the prompts to return to GitHub Desktop to finish authenticating.

  6. If you have configured two-factor authentication for GitHub, 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.
  7. Return to GitHub. In the prompt, enter your 2FA code, then click Verify.

    The 2FA Authentication code field

  8. After GitHub authenticates your account, return to GitHub Desktop.

Authenticating to GitHub using your username and password

  1. In the upper-left corner of your screen, select the GitHub Desktop menu, then click Preferences.

    The Preferences value in the GitHub Desktop drop-down menu

  2. In the Preferences window, select Accounts.

    The Accounts pane in the Preferences window

  3. 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.
  4. To add a GitHub Enterprise account, type your credentials under "Enterprise server address," then click Continue.

    The Sign In button for GitHub Enterprise

  5. To add a GitHub account, type your GitHub.com credentials and click Sign in.

    The Sign In button for GitHub

  6. 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.
  7. Return to GitHub Desktop. In the prompt, enter your 2FA code, then click Sign in.

    The 2FA code prompt

Authenticating to GitHub using the browser

  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. To the right of "GitHub.com," click Sign in.

    The Sign In button for GitHub

  5. In the Sign in pane, click Sign in using your browser.

    The Sign in using your browser link

  6. To authenticate to GitHub, type your GitHub.com credentials and click Sign in.

    The Sign In button for GitHub in browser

    Alternatively, if you were already logged in to GitHub, follow the prompts to return to GitHub Desktop to finish authenticating.

  7. If you have configured two-factor authentication for GitHub, 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. In the prompt, enter your 2FA code, then click Verify.

    The 2FA Authentication code field

  9. After GitHub authenticates your account, return to GitHub Desktop.

Authenticating to GitHub using your username and password

  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

Were you able to find what you were looking for?

Ask a human

Can't find what you're looking for?

Contact us