Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-8422

SourceTree can't authenticate with Github

    XMLWordPrintable

Details

    • Bug
    • Resolution: Resolved Locally
    • Highest
    • None
    • 2.4.8.0
    • Git
    • Windows 10 Home v 1709 build 16299.192

      SourceTree version 2.4.8.0

      Embedded Git version 2.15.1/ LibGit2Sharp v0.24.0 + git-lfs v2.0.2 + + Git LFS Bitbucket Adapter v1.0.6

    • Severity 1 - Critical

    Description

      I have SourceTree configured with authentication information for Mercurial on Bitbucket and Git on Bitbucket, GitHub, and visualstudio.com . Recently, SourceTree will not authenticate correctly with GitHub. Although my GitHub credentials are saved in the SourceTree authentication settings, whenever I try to push to or pull from a GitHub repository, a "GitHub Login" window appears and asks me to enter my username and password. Even if I type the information correctly, SourceTree displays an error:

       

      fatal: HttpRequestException encountered.
       An error occurred while sending the request.
      remote: Invalid username or password.
      

       

      However, I can log into GitHub using the same username and password in a browser. If I try to push or pull using the Git terminal, it shows the "GitHub Login" dialog and fails when I enter my information. Then it asks for a username in the terminal, then displays an OpenSSH password prompt. After I enter my password in the OpenSSH prompt, it does connect successfully. However, this approach only works in the terminal, and SourceTree does not detect changes made from the terminal - so if I push or pull, SourceTree doesn't realize it.

      I have tried deleting my saved GitHub account information from SourceTree. I can remove GitHub from the sections "Accounts" and "Git Saved Paswords". However, once I remove GitHub from "Git Saved Passwords", it appears under "Rest Saved Passwords" and cannot be removed.

      I've tried re-adding GitHub using both OAuth and Basic auth, and in both cases SourceTree reports "Authentication OK" from the settings dialog, but my issue persists - SourceTree always shows me the login prompt when I try to push or pull and always says that I typed in the password incorrectly even when I type it in correctly.

      Again, I can log in through the browser or through Git terminal; I haven't forgotten my password and don't have trouble typing it in correctly.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ce7b0fcaf726 kevinfoley
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: