Skip to content

Authentication failed issue #18586

Closed
Closed

Description

The problem

Github Dekstop updated to 3.3.15 and is now asking for credentials to fetch everytime. We use Azure DevOps repo with Personal access tokens. Anyone on our team with 3.3.14 is not having this issue. We receive the following error everytime even when updating the access token on Azure.
image
image

Release version

3.3.15

Operating system

Windows 11

Steps to reproduce the behavior

Fetch any repo from private repo on Azure Devops

Log files

2024-05-09.desktop.production.log

Screenshots

image
image

Additional context

Have about 20 members on the team and anyone who has version 3.3.15 and up of Github Desktop is having this issue. Anyone with 3.3.14 is not.

Activity

  1. tidy-dev commented on May 9, 2024

    @tidy-dev
    Contributor

    @trains78 Can you please update to the latest (being 3.3.17) and let us know if you are still having issues?

  2. steveward commented on May 9, 2024

    @steveward
    Contributor

    Thanks for the issue @trains78. This should be fixed in the latest release of GitHub Desktop.

    Could you please try holding down Alt on your keyboard and then clicking on the Check for updates button (it'll change its text to Ensure latest version)? Once the new version has been installed please let us know if you run into any issues.

  3. added
    more-info-needed
    on May 9, 2024
  4. removed
    more-info-needed
    on May 9, 2024
  5. tidy-dev commented on May 9, 2024

    @tidy-dev
    Contributor

    Just to make sure I understand: You have 19 devs that can access the same repositories that is failing for the one on 3.3.17?

    If so could you make sure that that user is using a valid PAT and try to authenticate again.

  6. added
    more-info-needed
    on May 9, 2024
  7. poblish commented on May 9, 2024

    @poblish

    I have started to see this today with 3.3.17 when trying to push to a self-hosted Gogs repo on localhost. I've never had any problems doing that until today (multiple years of use, many times per day). I've had to switch to doing Open in Terminal and pushing from there. No auth or PAT is involved here. Using macOS 14.4.1 (23E224)

    By contrast, pushing to our private Github repos is all fine.

    Looking at the release history, I can't be sure whether I was using 3.3.15 or 3.3.16 before I noticed the upgrade announcement and clicked on it this evening, but I am 100% on 3.3.17 now.

    I see this issue has some history, so apologies if I've posted in the wrong place 😊


    This might help:

    2024-05-09T23:59:16.219Z - info: [ui] askPassHandler: no account found for localhost
    2024-05-09T23:59:37.908Z - info: [ui] askPassHandler: user cancelled generic git authentication
    2024-05-09T23:59:37.919Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin (took 21.736s)
    2024-05-09T23:59:37.919Z - error: [ui] `git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin` exited with an unexpected code: 128.
    stderr:
    fatal: Authentication failed for 'http://localhost:3000/aregan/MyRepo.git/'
    
    (The error was parsed as 2: Authentication failed. Some common reasons include:
    
    - You are not logged in to your account: see GitHub Desktop > Settings.
    - You may need to log out and log back in to refresh your token.
    - You do not have permission to access this repository.
    - The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
    - If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
    - If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
    - If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.)
    2024-05-09T23:59:41.986Z - info: [ui] askPassHandler: no account found for localhost
    
  8. JoseIvanHernandez commented on May 10, 2024

    @JoseIvanHernandez
  9. herobrinePerssion commented on May 10, 2024

    @herobrinePerssion

    Is there anyone can fix this ?

  10. removed
    more-info-needed
    on May 10, 2024
  11. niik commented on May 10, 2024

    @niik
    Member

    @poblish I see that you're using repositories over unencrypted http, we fixed a regression related to this scenario in #18589 and we've released it to our beta channel. Could you please try installing our beta version from https://desktop.github.com/beta/ and try again?

    @herobrinePerssion Could you please open a new issue and provide some more details and a log file? Before doing so please make sure you've also updated to the latest beta version from https://desktop.github.com/beta/.

    @trains78 We fixed a few bugs in rapid succession in 3.3.16 and 3.3.17. If the issue persist for users on 3.3.17 please have one of them open a new issue and include a log file so that we can investigate. Thanks!

  12. RoHeck commented on May 10, 2024

    @RoHeck

    I have the same problem (with Azure DevOps). Is there a way to install/download an older version of github-desktop?

  13. niik commented on May 10, 2024

    @niik
    Member

    @RoHeck What version of GitHub Desktop are you on right now? If it's 3.3.17 could you please
    open a new issue and upload a log file from GitHub Desktop so that I could get some more information about this issue? To access the log files go to the file menu in GitHub Desktop and select Help > Show Logs in Finder (macOS) or Explorer (Windows).

    The log files are created daily -- please upload a log file as an attachment from a day where you experienced the issue. Thanks!

  14. 45 remaining items

  15. sgomezag23 commented on Jun 7, 2024

    @sgomezag23

    This is still not working for me on 3.4.1 :(

  16. number005 commented on Jun 7, 2024

    @number005

    Same issue 3.4.1

  17. LachanceGL commented on Jun 8, 2024

    @LachanceGL

    Having this issue also on 3.4.1

  18. LachanceGL commented on Jun 8, 2024

    @LachanceGL

    Fixed it on my side - this might help some

    I think the issue of many might be coming from the fact that once you try to Push again, for some reason GitHub Desktop asks you to re-enter the Password, and this is where the confusion might be coming from

    Some might be using the username/password, some a Token key that is not valid anymore, etc.

    So once you try to enter the [wrong] password, GitHub Desktop then won't ask you again for the Password anymore, only prompting with the Failed Auth popup message

    So what you have to do is go to your 'Windows Credidential Manager', remove the one associated with your repo URL then GitHub Desktop will ask you again to enter the Password when trying to Push

    Now make sure to Regenerate your Token, and enter this one when asking the Password, and it should work correctly now

  19. niik commented on Jun 12, 2024

    @niik
    Member

    👋 we just shipped GitHub Desktop 3.4.2-beta2 to our beta channel. This includes support for using Git Credential Manager. It's currently off by default but you can enable it in Settings under the advanced tab. We believe this will address the authentication problems outlined in this issue.

    Screenshot of Desktop's advanced preferences section with a highlight around the new option to enable Git Credential Manager

    When Git Credential Manager (GCM) is enabled all credentials for third-party (i.e. Azure Devops, BitBucket, GitLab etc) will be handled, and stored, outside of GitHub Desktop. GCM supports browser-sign in to many popular services and will avoid the need to create personal access tokens (PATs).

    Please download our beta version from https://desktop.github.com/beta/ to give this a go and please report back with your experience. We'll be collecting feedback in our beta channel which will inform when we make this available to all users. Installing the beta version will not clear your preferences or tracked repositories and you can switch to the production version by simply downloading the latest version from https://desktop.github.com.

  20. cloydlau commented on Jun 12, 2024

    @cloydlau
  21. niik commented on Jun 12, 2024

    @niik
    Member

    @cloydlau I've opened #18824 on your behalf as it seems your scenario is slightly different than the majority of reports in here and I don't want to add more to this thread than I have to. Please meet me over there

  22. dhartleryan commented on Jun 12, 2024

    @dhartleryan

    It worked! Thank you so much!

  23. sgomezag23 commented on Jun 12, 2024

    @sgomezag23

    It's working, thank you very much.

  24. neeldoshii commented on Dec 6, 2024

    @neeldoshii

    still facing the issue, can anyone provide fix?
    I created new sha key, performed login-logout still facing.

  25. MAwais-MQL commented on Feb 8, 2025

    @MAwais-MQL

    Image

    I faced this issue while pushing my commits.

  26. karamjb commented on Apr 8, 2025

    @karamjb

    Same issue with version 3.4.18 (arm64)

  27. adist commented on May 28, 2025

    @adist

    still happend in versin 3.4.20-beta (x64)..

    about 2 hours ago it still working, but, when i wrote this it still appearing credential error like mentioned above even re-login via github credential. Affected in all my repository (either mine or not).

  28. WizardJosh commented on May 28, 2025

    @WizardJosh

    I fought with this for months. Fix for me was to find/create .gitconfig file in C:\Users\MyUsername\ if you have one there and have a [safe] section add to the safe section directory = * If you do not see a safe section create one [safe] and underneath use directory = *
    This was like the 36th option i tried and finally worked. Don't know if you have exhausted this or not. If not worth a try.

  29. shadzic commented on Dec 17, 2025

    @shadzic

    Hello
    I am facing the same issue with Github Desktop version 3.5.4 (x64). I have also installed the beta version.

    Image

    I have enabled the Git Credentials.
    I get this error from time to time and I cannot enter my credentials. The workaround for me is to delete the repo and clone it again, which is inefficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions