Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed - Azure DevOps #18606

Closed
sebgott opened this issue May 13, 2024 · 11 comments
Closed

Authentication failed - Azure DevOps #18606

sebgott opened this issue May 13, 2024 · 11 comments

Comments

@sebgott
Copy link

sebgott commented May 13, 2024

The problem

Hi since updating to the newest version, 3.3.17, I have to reenter my credentials for Azure DevOps every time I switch repos (email and PAT). This was working fine until Wednesday 08-May-2024

Release version

3.3.17

Operating system

MacOS

Steps to reproduce the behavior

  1. Push/Pull from an Azure DevOps repo.
  2. Enter credentials
  3. Swap repo
  4. You now need to enter the credentials again

Log files

  • 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-13T11:10:19.697Z - 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 'https://dev.azure.com/org/project/_git/repo/'

(The error was parsed as 4: Authentication failed. Some common reasons include:

Changed the actual link to the repo to a generic

Screenshots

Screenshot at May 13 13-31-08

Additional context

No response

@sergiou87
Copy link
Member

sergiou87 commented May 13, 2024

@sebgott could you share the whole log file so we can get more context, please 🙏 ? Thank you!

@sergiou87 sergiou87 added the more-info-needed The submitter needs to provide more information about the issue label May 13, 2024
@sebgott
Copy link
Author

sebgott commented May 13, 2024

test.log

Here is the whole log

@github-actions github-actions bot removed the more-info-needed The submitter needs to provide more information about the issue label May 13, 2024
@sergiou87
Copy link
Member

Thank you @sebgott

Is it possible you have set up different PATs for each of your Azure DevOps repos? If so, could you remove all Azure DevOps except for one in the repository list and see if you can get the credentials to work with that one?

I wonder if GitHub Desktop is asking you credentials for a different repo than the one you're providing the credentials for.

It'd be interesting to see if you could use this command in the terminal from your repo path, providing the same credentials, and see if it works: git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin

@sergiou87 sergiou87 added the more-info-needed The submitter needs to provide more information about the issue label May 13, 2024
@sebgott
Copy link
Author

sebgott commented May 14, 2024

I only have one PAT that I have used for the past 2-3 months now without any problems. All the repos are in the same org and project in ADO. Ran the command, but I still get prompted for username and password every time I try to use Github Desktop.

@github-actions github-actions bot removed the more-info-needed The submitter needs to provide more information about the issue label May 14, 2024
@sergiou87
Copy link
Member

@sebgott but did the command work or did it also fail?

One more question: does your repo use LFS?

@sergiou87 sergiou87 added the more-info-needed The submitter needs to provide more information about the issue label May 14, 2024
@sebgott
Copy link
Author

sebgott commented May 14, 2024

@sergiou87 The command worked, or at least I assume it did because it did not return any errors (it did not say anything). We do not use LFS

@github-actions github-actions bot removed the more-info-needed The submitter needs to provide more information about the issue label May 14, 2024
@edwinh-capfin
Copy link

Also getting this same issue.

@aolszowka
Copy link

@edwinh-capfin / @sebgott Does #18586 (comment) temporarily resolve this for you?

@weixihd
Copy link

weixihd commented May 20, 2024

Every time I pull the push code, I need to re-enter the user name and password. How can I solve this problem?

@sergiou87
Copy link
Member

Hello 👋

Please, try the latest beta (3.3.19-beta2) from https://desktop.github.com/beta which includes support for multiple git credentials on the same host based on different repository paths and let us know if it works.

After updating, you might need to re-enter your credentials for your Azure DevOps repositories.

For hosts other than dev.azure.com, you might need to set useHttpPath to true for whatever domain your repos are hosted on. For example, for gitlab:

git config --global credential.https://gitlab.com.useHttpPath true

Thank you for your patience 🙏

@sebgott sebgott closed this as completed May 28, 2024
@sebgott
Copy link
Author

sebgott commented May 28, 2024

Works now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants