Skip to main content

Authenticating to GitHub in GitHub Desktop

You can securely access your account's resources on GitHub Desktop by authenticating to GitHub.

Platform navigation

About authentication

To keep your account secure, you must authenticate before you can use GitHub Desktop to access resources on GitHub.

Before you authenticate, you must already have an account on GitHub. For more information, see Creating an account on GitHub.

Authenticating to your GitHub account

  1. In the menu bar, select GitHub Desktop, then click Settings.

    Screenshot of the menu bar on a Mac. Under the open "GitHub Desktop" dropdown menu, the cursor hovers over "Settings", which is highlighted in blue.

  2. In the "Settings" window, on the Accounts pane, click the appropriate "Sign Into" button. Use Sign Into GitHub Enterprise to sign into GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.

    Screenshot of the "Accounts" pane in the "Settings" window. Blue buttons labeled "Sign Into GitHub.com" and "Sign Into GitHub Enterprise" are shown.

  3. If you are signing into an account on GitHub Enterprise, in the "Sign in" modal window, type the URL where you access GitHub, then click Continue.

  4. In the "Sign in Using Your Browser" modal window, click Continue With Browser. GitHub Desktop will open your default browser.

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

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

  6. If you have configured two-factor authentication (2FA) 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.

    Then enter your 2FA code in the prompt on GitHub and click Verify.

  7. After GitHub authenticates your account, follow the prompts to return to GitHub Desktop.

Authenticating to your GitHub account

  1. Use the File menu, then click Options.

    Screenshot of the "GitHub Desktop" menu bar on Windows. In the expanded "File" dropdown menu, the "Options" item is outlined in orange.

  2. In the "Options" window, on the Accounts pane, click the appropriate "Sign Into" button. Use Sign Into GitHub Enterprise to sign into GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.

    Screenshot of the "Accounts" pane in the "Options" window. Blue buttons labeled "Sign Into GitHub.com" and "Sign Into GitHub Enterprise" are shown.

  3. If you are signing into an account on GitHub Enterprise, in the "Sign in" modal window, type the URL where you access GitHub, then click Continue.

  4. In the "Sign in Using Your Browser" modal window, click Continue With Browser. GitHub Desktop will open your default browser.

    Warning

    Authenticating to GitHub using your username and password is not supported. We require authenticating using the browser instead.

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

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

  6. If you have configured two-factor authentication (2FA) 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.

    Then enter your 2FA code in the prompt on GitHub and click Verify.

  7. After GitHub authenticates your account, follow the prompts to return to GitHub Desktop.

Troubleshooting authentication issues

If GitHub Desktop encounters an authentication error, you can use error messages to troubleshoot.

If you encounter an authentication error, first try signing out and signing back in to your account on GitHub Desktop.

For some errors, GitHub Desktop will prompt you with an error message. If you are not prompted, or to find more information about any error, view the GitHub Desktop log files by using the following steps.

  1. In the menu bar, select Help, then click Show Logs in Finder.

    Screenshot of the "GitHub Desktop" menu bar on a Mac. Under the expanded "Help" dropdown menu, "Show Logs in Finder" is highlighted blue.

  2. Select the log file from the date when you encountered the authentication error.

  1. Use the Help drop-down menu and click Show Logs in Explorer.