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

Clone from Azure DevOps works fine, but authentication fails when I try to push #16023

Closed
adremeaux opened this issue Jan 27, 2023 · 8 comments
Closed

Comments

@adremeaux
Copy link

adremeaux commented Jan 27, 2023

The problem

I cloned my Azure DevOps repo from the instructions on this page: https://github.com/desktop/desktop/blob/development/docs/integrations/azure-devops.md

The clone had some issues with GitLFS but once I sorted that it worked fine. I've tried to make a commit and push it and am getting an auth error. If I try to push via the command line I have to sign into my Microsoft account but then it works fine.

Here is the relevant bit from the logs:

023-01-27T18:19:15.253Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: Plants_Game - adremeaux (has token)
2023-01-27T18:19:31.074Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2}
2023-01-27T18:19:31.622Z - info: [ui] [AppStore] loading 7 repositories from store
2023-01-27T18:19:31.622Z - info: [ui] [AppStore] found account: adremeaux (adremeaux)
2023-01-27T18:19:31.673Z - info: [ui] [BranchPruner] Last prune took place 3 minutes ago - skipping
2023-01-27T18:19:31.769Z - info: [ui] launching: 3.1.4 (Windows 10.0.22621)
2023-01-27T18:19:31.773Z - info: [ui] execPath: 'C:\Users\adrem\AppData\Local\GitHubDesktop\app-3.1.4\GitHubDesktop.exe'
2023-01-27T18:19:32.213Z - info: [ui] Subscribed 'adremeaux' to Alive channel
2023-01-27T18:19:34.948Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: Plants_Game - adremeaux (has token)
2023-01-27T18:20:00.259Z - 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 '[redacted for privacy]'

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

  • You are not logged in to your account: see File > Options.
  • 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.)

Release version

3.1.4

Operating system

Windows 11

Steps to reproduce the behavior

No response

Log files

No response

Screenshots

No response

Additional context

No response

@steveward
Copy link
Contributor

Thanks for the issue @adremeaux. Any chance the access token was created with read-only permissions instead of read/write? That's the only guess I have about why cloning would work, but pushing fails. I'd recommend recreating the token as a first step to see if that gets things working.

@steveward steveward added the more-info-needed The submitter needs to provide more information about the issue label Jan 27, 2023
@adremeaux
Copy link
Author

If I recreate the token, how do I set it in GitHub Desktop? The only time it's prompted me for the token is during the clone itself. I'd prefer to not have to clone the entire repo again.

@github-actions github-actions bot removed the more-info-needed The submitter needs to provide more information about the issue label Jan 27, 2023
@adremeaux
Copy link
Author

You know if I jam my token right into the repo url in repo settings (https://login:token@...) it works, but I wager I probably shouldn't do that.

@steveward
Copy link
Contributor

@adremeaux you can remove the existing token from the Windows Credential Manager, and then you should be prompted to enter it again .

@adremeaux
Copy link
Author

adremeaux commented Feb 1, 2023 via email

@SgtFlex
Copy link

SgtFlex commented Nov 14, 2023

Chiming in to say that this is the message that pops up. I tried removing the azure token from Windows credential manager and it still does not prompt me for anything.

image

(I am also using Azure DevOps and experiencing the same issue. Can push to repo just fine through CLI but does not work with GitHub Desktop).

@tooOpen
Copy link

tooOpen commented Nov 27, 2023

I have same problem please answer us !!!!
github desktop!!! Microsoft!!!
#16900

@sergiou87
Copy link
Member

Hopefully this is already fixed with the latest auth-related changes #18700

Otherwise let us know and we will reopen it!

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