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

git operations results in "fatal: User canceled authentication." and prompts for username and password #1617

Open
mvanchaa opened this issue May 14, 2024 · 2 comments
Labels
auth:microsoft Specific to Microsoft AAD/MSA authentication auth-issue An issue authenticating to a host external Relating to an external partner, team, or library windows-broker Related to the Windows "Web Account Manager" authentication broker

Comments

@mvanchaa
Copy link

mvanchaa commented May 14, 2024

Version

2.5.0+d34930736e131ad80e5690e5634ced1808aff3e2

Operating system

Windows

OS version or distribution

Windows 10.0.19045.4355

Git hosting provider(s)

Azure DevOps

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

https://{org}.visualstudio.com

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

git pull should successfully update the local version of a repo from a remote server

Actual behavior

git pull results in the following error:
fatal: User canceled authentication.
Username for 'https://dev.azure.com/{organization}/{project}/_git/{repository}':

We observed this behavior for other git commands too.

Logs

This problem has been intermittently affecting several office developers at Microsoft. The broker authentication is failing for some reason. However, we found a temporary solution by switching to a non-broker authentication mode in GCM by setting credential.msauthUseBroker flag to false in the git config file. Redacted logs are attached for further analysis.
gitlogs.log

@mvanchaa mvanchaa added the auth-issue An issue authenticating to a host label May 14, 2024
@mvanchaa mvanchaa changed the title git pull results in "fatal: User canceled authentication." and prompts for username and password git operations results in "fatal: User canceled authentication." and prompts for username and password May 14, 2024
@mvanchaa
Copy link
Author

Looks like it's a bug with MSAL broker flow and they just seemed to have fixed it AzureAD/microsoft-authentication-library-for-dotnet#4696 today. Once GCM consumes the latest MSAL, this issue would be fixed.

@mvanchaa
Copy link
Author

mvanchaa commented May 28, 2024

MSAL fixed the bug and released a new version 4.61.1.

@mjcheetham mjcheetham added auth:microsoft Specific to Microsoft AAD/MSA authentication external Relating to an external partner, team, or library windows-broker Related to the Windows "Web Account Manager" authentication broker labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth:microsoft Specific to Microsoft AAD/MSA authentication auth-issue An issue authenticating to a host external Relating to an external partner, team, or library windows-broker Related to the Windows "Web Account Manager" authentication broker
Projects
None yet
Development

No branches or pull requests

3 participants
@mjcheetham @mvanchaa and others