-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Hello,
After upgrading to Git For Windows version 2.33.1
, we started seeing new messages on stderr
as well as slow downs.
gpakosz@DES-00703 MINGW64 /d/Projects/xxx (master)
$ git --version
git version 2.33.1.windows.1
gpakosz@DES-00703 MINGW64 /d/Projects/xxx (master)
$ git fetch -p
info: detecting host provider for 'https://scm.corp.example.com/'...
info: detecting host provider for 'https://scm.corp.example.com/'...
info: detecting host provider for 'https://scm.corp.example.com/'...
Even though I landed on https://github.com/microsoft/Git-Credential-Manager-Core/blob/main/docs/autodetect.md, I still don't understand what this auto-detection of host provider is for.
Can you please elaborate on why the core credential manager needs to be aware of the application running on the remote server? What's the link with the Git protocol and authentication?
We also noticed the portable version of Git which uses git-credential-wincred.exe
doesn't exhibit this behavior while working perfectly.
Using
git config --global credential.scm.corp.example.com.provider generic
or
git config --global credential.scm.corp.example.com.provider bitbucket
doesn't seem to end up with other observable side effect than the suppression of the messages.
Finally note that our remote repositories are handled by an on premise Bitbucket Server instance which is behind a reverse proxy. A HEAD
request exhibits the X-AREQUESTID
header you're looking for:
curl -I https://scm.corp.example.com
HTTP/1.1 302
Server: nginx/1.14.2
Date: Thu, 14 Oct 2021 10:14:14 GMT
Connection: keep-alive
X-AREQUESTID: @1WFLNF3x734x12390371x1
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Location: https://scm.corp.example.com/repos?visibility=public
Content-Language: en-US
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
My understanding is that providers.TryGetFirst(x => x.IsSupported(probeResponse), out match)
calls into BitbucketHostProvider.IsSupported()
after other providers.
All in all, it seems too bad this auto detection is needed at all and done in sequence.
Thanks.