-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
This issue doesn't specifically fall into any of the template patterns - the authentication itself succeeds, but the behavior is incorrect because GCM core isn't actually resolving it.
When NO_PROXY
/no_proxy
contains a glob pattern (i.e. *.my.domain
), GCM core fails with an error such as:
info: detecting host provider for 'https://git.my.domain/'...
fatal: parsing "*.my.domain" - Quantifier {x,y} following nothing.
and git falls back to using git-askpass
.
I'm not getting a lot of useful info from GIT_TRACE
in GCM core, but I have been able to track it down to GCM core as follows:
This fails:
$ echo -e "protocol=https\nhost=git.my.domain" | GIT_TRACE=1 ~/AppData/Local/Programs/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get
info: detecting host provider for 'https://git.my.domain/'...
fatal: parsing "*.my.domain" - Quantifier {x,y} following nothing.
$ echo $?
127
While this succeeds:
$ echo -e "protocol=https\nhost=git.my.domain" | GIT_TRACE=1 NO_PROXY= no_proxy= ~/AppData/Local/Programs/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get
info: detecting host provider for 'https://git.my.domain/'...
protocol=https
host=git.my.domain
username=<redacted>
password=<redacted>
$ echo $?
0
The underlying issue here is that there doesn't appear to be a standard format for NO_PROXY
/no_proxy
. cURL wants a leading dot instead of a glob (i.e. .my.domain
instead of *.my.domain
), however cURL also supports *
to match all hosts
Most other tools handle an incorrectly formatted NO_PROXY
entry gracefully (i.e. by ignoring it) however GCM core is immediately exiting with an error code, and not completing its task of getting/storing the variables.
There's probably a separate question of why GCM core even needs to care about the proxy settings for get/store operations, but the main issue here is that it's aborting when it probably shouldn't.
This is happening in GCM core version 2.0.567+3047faf390 on Windows (bundled with Git for Windows version 2.33)