-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Username error message when using Windows Integrated Authentication #1331
Labels
auth-issue
An issue authenticating to a host
Comments
1 task
mjcheetham
added a commit
that referenced
this issue
Jul 12, 2023
Before 2.2.0, we only accepted input arguments in the form `key=value`. To support the new `wwwauth[]` argument from Git, we added support for these multi-value args `key[]=value`. In changing from an dictionary of `string:string` to `string:list<string>` we accidentally changed the behaviour of dictionary parsing in the case that an empty valued (non-multi) argument was provided. For example: ```text username=\n ``` Previously this was returned as an empty string. Post 2.2.0 this became `null`, causing an error in scenarios were before there was none. One such scenario is with Windows Integrated Authentication (for example when connecting to Azure DevOps Server/TFS instances), whereby we return an empty username and password to Git to signal this auth mode. Git then returns to us the empty username and password in a `store` call. Update the handling in `ParseMultiLine` to restore the previous behaviour for empty-valued arguments being mapped to the empty string. Fixes #1331 --- **Bug reproduction steps:** ```console % printf "url=https://example.com\nusername=\npassword=\n\n" | git credential approve fatal: Missing 'username' input argument ```
Merged
mjcheetham
added a commit
that referenced
this issue
Jul 12, 2023
**Changes since 2.2.1:** - Fix an issue where duplicate "Personal Access Token" GitHub account options are shown when Visual Studio has a GitHub account signed-in (#1325 #1328) - Fix an issue with Azure DevOps Server (TFS) and Windows Integrated Authentication (#1331 #1332) - Fix an issue with OAuth redirects GitHub Enterprise Server (#1329 #1330) - Correctly handle non-ASCII username/passwords with the WPF UI helpers (#1287 #1326)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.2.1
Operating system
Windows
OS version or distribution
Windows Server 2019
Git hosting provider(s)
Azure DevOps Server (TFS/on-prem)
Other hosting provider
No response
(Azure DevOps only) What format is your remote URL?
None
Can you access the remote repository directly in the browser?
Yes, I can access the repository
Expected behavior
We're using provider = generic and interactive = false with an HTTPS url and Windows Integrated Authentication to an on-premise instance of Azure DevOps Server 2022. This worked without issue using GCM 2.1.2.
Actual behavior
With GCM 2.2.1, git commands generate the following output, but do appear to succeed anyway. Downgrading Git for Windows to switch back to GCM 2.1.2 resolves the issue.
Logs
URLs have been sanitized.
The text was updated successfully, but these errors were encountered: