Skip to content

Conversation

mjcheetham
Copy link
Contributor

To enable using the default system credentials for authenticated proxies we must set the WebProxy.UseDefaultCredentials property to true.
(For example, with Windows Integrated Authentication-based proxies - NTLM or Kerberos.)

Currently we set this if no username and password information is specified at all in the proxy configuration. However, Git itself when presented with this configuration will prompt the user for a username/password (which isn't required).

Specifying an empty string username/password in the proxy configuration will stop Git from prompting for them, and allow cURL to auto-negotiate proxy auth. However, GCM reads that same configuration as having a username/password based proxy with the empty string for both values.

We change GCM to use the system default credentials when configuring a proxy if there is no userinfo OR if BOTH the username and password values are the empty string.

Example proxy config value: http://:@proxy.example.com

Fixes #216

To enable using the default system credentials for authenticated proxies
we must set the `WebProxy.UseDefaultCredentials` property to `true`.
(For example, with Windows Integrated Authentication-based proxies -
NTLM or Kerberos.)

Currently we set this if no username and password information is
specified at all in the proxy configuration. However, Git itself when
presented with this configuration will prompt the user for a
username/password (which isn't required).

Specifying an empty string username/password in the proxy configuration
will stop Git from prompting for them, and allow cURL to auto-negotiate
proxy auth. However, GCM reads that same configuration as having a
username/password based proxy with the empty string for both values.

We change GCM to use the system default credentials when configuring a
proxy if there is no userinfo OR if BOTH the username and password
values are the empty string.

Example proxy config value: http://:@proxy.example.com
@mjcheetham mjcheetham added the bug A bug in Git Credential Manager label Nov 12, 2020
@mjcheetham mjcheetham merged commit c3a543a into git-ecosystem:master Nov 12, 2020
@mjcheetham mjcheetham deleted the ntlm-proxy-auth branch November 12, 2020 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A bug in Git Credential Manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty username and password proxy config should enable WIA/default credentials

3 participants