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, Vous devez déjà avoir un compte sur GitHub.com. Pour plus d’informations, consultez « Inscription à un nouveau compte GitHub ».

Authenticating an account on GitHub

  1. Dans la barre de menus, sélectionnez GitHub Desktop , puis cliquez sur Préférences.

    Capture d’écran de la barre de menus sur un Mac. Dans le menu déroulant ouvert « GitHub Desktop », le curseur pointe sur « Préférences », qui est mis en évidence en bleu.

  2. In the "Preferences" window, on the Accounts pane, click the Sign In button next to "GitHub.com".

    Screenshot of the "Accounts" pane in the "Preferences" window. Next to "GitHub.com", a button, labeled "Sign In", is outlined in orange.

  3. Dans la fenêtre modale « Se connecter à l’aide de votre navigateur », cliquez sur Continuer avec le navigateur. GitHub Desktop ouvre votre navigateur par défaut.

  4. Pour vous authentifier auprès de GitHub, dans le navigateur, tapez vos informations d’identification GitHub.com et cliquez sur Se connecter.

    Ou bien, si vous êtes déjà connecté à GitHub, suivez les invites pour revenir à GitHub Desktop afin de terminer l’authentification.

  5. Si vous avez configuré l’authentification à 2 facteurs (2FA) pour GitHub, effectuez l’une des opérations suivantes :

    • Si vous configurez 2FA via SMS, récupérez votre code 2FA à partir d’un message SMS.
    • Si vous configurez 2FA avec une application TOTP, générez un code 2FA.

    Entrez ensuite votre code 2FA dans l’invite sur GitHub, puis cliquez sur Vérifier.

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

Authenticating an account on GitHub Enterprise Server

  1. Dans la barre de menus, sélectionnez GitHub Desktop , puis cliquez sur Préférences.

    Capture d’écran de la barre de menus sur un Mac. Dans le menu déroulant ouvert « GitHub Desktop », le curseur pointe sur « Préférences », qui est mis en évidence en bleu.

  2. In the "Preferences" window, on the Accounts pane, click the Sign In button next to "GitHub Enterprise".

    Screenshot of the "Accounts" pane in the "Preferences" window. Next to "GitHub Enterprise", a button, labeled "Sign In", is outlined in orange.

  3. To add an account on votre instance GitHub Enterprise Server, in the "Sign in" modal window, type the URL for your instance under "Enterprise address," then click Continue.

  4. Dans la fenêtre modale « Se connecter à l’aide de votre navigateur », cliquez sur Continuer avec le navigateur. GitHub Desktop ouvre votre navigateur par défaut.

  5. To authenticate to votre instance GitHub Enterprise Server account, type your account credentials and click Sign in.

    Alternatively, if you were already signed in to votre instance GitHub Enterprise Server account, follow the prompts to return to GitHub Desktop to finish authenticating.

Authenticating an account on GitHub

  1. Utilisez le menu Fichier, puis cliquez sur Options.

    Capture d’écran de la barre de menus « GitHub Desktop » sur Windows. Dans le menu déroulant « Fichier » développé, l’élément « Options » est mis en évidence avec un encadré orange.

  2. In the "Options" window, on the Accounts pane, click the Sign In button next to "GitHub.com".

    Screenshot of the "Accounts" pane in the "Options" window. Next to "GitHub.com", a button, labeled "Sign In", is outlined in orange.

  3. Dans la fenêtre modale « Se connecter à l’aide de votre navigateur », cliquez sur Continuer avec le navigateur. GitHub Desktop ouvre votre navigateur par défaut.

    Avertissement : L’authentification sur GitHub avec votre nom d’utilisateur et votre mot de passe n’est pas prise en charge. À la place, nous vous demandons de vous authentifier en utilisant le navigateur.

  4. Pour vous authentifier auprès de GitHub, dans le navigateur, tapez vos informations d’identification GitHub.com et cliquez sur Se connecter.

    Ou bien, si vous êtes déjà connecté à GitHub, suivez les invites pour revenir à GitHub Desktop afin de terminer l’authentification.

  5. Si vous avez configuré l’authentification à 2 facteurs (2FA) pour GitHub, effectuez l’une des opérations suivantes :

    • Si vous configurez 2FA via SMS, récupérez votre code 2FA à partir d’un message SMS.
    • Si vous configurez 2FA avec une application TOTP, générez un code 2FA.

    Entrez ensuite votre code 2FA dans l’invite sur GitHub, puis cliquez sur Vérifier.

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

Authenticating an account on GitHub Enterprise

  1. Utilisez le menu Fichier, puis cliquez sur Options.

    Capture d’écran de la barre de menus « GitHub Desktop » sur Windows. Dans le menu déroulant « Fichier » développé, l’élément « Options » est mis en évidence avec un encadré orange.

  2. In the "Options" window, on the Accounts pane, click the Sign In button next to "GitHub Enterprise".

    Screenshot of the "Accounts" pane in the "Options" window. Next to "GitHub Enterprise", a button, labeled "Sign In", is outlined in orange.

  3. To add a GitHub Enterprise account, type your credentials under "Enterprise address," then click Continue.

  4. Si vous avez configuré l’authentification à 2 facteurs pour GitHub Enterprise, effectuez l’une des opérations suivantes :

    • Si vous configurez 2FA via SMS, récupérez votre code 2FA à partir d’un message SMS.
    • Si vous configurez 2FA avec une application TOTP, générez un code 2FA.

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, a cursor hovers over "Show Logs in Finder", highlighted in 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.

    Screenshot of the "GitHub Desktop" menu bar on Windows. In the expanded "Help" dropdown menu, an option labeled "Show Logs in Explorer" is outlined in orange.

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

Review the troubleshooting information below for the error message that you encounter.

Bad credentials

Error: Bad credentials

This error means that there is an issue with your stored account credentials.

To troubleshoot, sign out of your account on GitHub Desktop and then sign back in.

Empty token

info: [ui] [AppStore.withAuthenticatingUser] account found for repository: node - USERNAME (empty token)

This error means that GitHub Desktop is unable to find the access token that it created in the system keychain.

To troubleshoot, sign out of your account on GitHub Desktop and then sign back in.

Repository not found

fatal: repository 'https://github.com/<user>/<repo>.git' not found

(The error was parsed as 8: The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.)

This error means that you do not have permission to access the repository that you are trying to clone.

To troubleshoot, contact the person in your organization who administers permissions.

Could not read from remote repository

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

This error means that you do not have a valid SSH key set up.

To troubleshoot, see "Génération d’une nouvelle clé SSH et ajout de celle-ci à ssh-agent."

Failed to clone

fatal: clone of 'git@github.com:<user>/<repo>' into submodule path '<path>' failed
Failed to clone 'src/github.com/<user>/<repo>'. Retry scheduled
Cloning into '<path>'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

This error means that either the repository that you are trying to clone has submodules that you do not have access to or you do not have a valid SSH key set up.

If you do not have access to the submodules, troubleshoot by contacting the person who administers permissions for the repository.

If you do not have a valid SSH key set up, see "Génération d’une nouvelle clé SSH et ajout de celle-ci à ssh-agent."

Unable to read AskPass response

error: unable to read askpass response from '/Users/<path>/GitHub Desktop.app/Contents/Resources/app/static/ask-pass-trampoline.sh'
fatal: could not read Username for 'https://github.com': terminal prompts disabled

This error can be caused by multiple events.

If the Command Processor registry entries are modified, GitHub Desktop will respond with an Authentication failed error. To check if these registry entries have been modified, follow these steps.

  1. Open the Registry Editor (regedit.exe) and navigate to the following locations. HKEY_CURRENT_USER\Software\Microsoft\Command Processor\ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\
  2. Check to see if there is an Autorun value in either location.
  3. If there is an Autorun value, delete it.

If your Windows username has extended Unicode characters, it may cause an AskPass response error. To troubleshoot, create a new Windows user account and migrate your files to that account. For more information, see "Create a user account in Windows" in the Microsoft documentation.

Further reading