-
Notifications
You must be signed in to change notification settings - Fork 2k
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 Credential Manager Core doesn't support TLS client certificates #369
Comments
Please can you answer the following questions from the issue template: Which version of GCM Core (and Git) are you using? From a terminal, run Which Git host provider are you trying to connect to?
Can you access the remote repository directly in the browser using the remote URL? From a terminal, run Logs Set the environment variables Additionally can you tell us (if you know):
Thanks! |
Is this possibly related to this Git issue? git-for-windows/git#3292 Starting from Git 2.32 (that includes cURL 7.77), TLS client certificates are not being sent automatically when using the schannel backend. |
Please test the latest Git for Windows snapshot. You will need to configure |
Hello, I'm not the one that created this issue, but I did open git-for-windows/git#3292. I don't use Git Credential Manager Core, but a colleague mentioned he did experience similar problems to the person that opened this issue, and reverted back to the old Git Credential Manager. However, he mentioned this has been going on for a longer time than would be possible, given the cause of that issue. (an update to curl) As I felt it might be similar to my ticket, I decided to attempt to replicate this. Unfortunately, the problem seems to be a bit older and is not fixed by the solution to git-for-windows/git#3292 I stored the credentials for a in-company hosted Bitbucket server (unfortunately, I cannot share the URL, as it is internal). The server is additionally secured by needing a client certificate available in the Windows Certificate Store. So my setup should be roughly the same. Using git blame, I have found a commit that seems to have introduced the problem: a73496b Until this commit, get returns the stored credentials:
Since a73496b it fails:
I guess it fails as the client certificate is not sent to the server. I tried repeating this in the most recent main with GCM_TRACE enabled:
I guess the autodetection in a73496b causes a connection to be opened. As no special care is taken to send client certificates from the certificate store, the connection fails. So I guess either client certificates need to be sent to the server, or the connection failure should not prevent git-credential-manager-core from returning stored credentials. I hope I've been able to be of help. Have a good weekend! |
@mjcheetham this looks like a tough one for us to handle, since we don't have a mutual TLS setup anyplace. Thoughts on what to do? |
While this is not fixed, I think the severity of the problem has decreased with recent changes. I noticed after the last Git for Windows update, that the new version of Git-Credential-Manager-Core (I have version 2.0.567+3047faf390) shows a better, more informative message if the autodetection goed wrong that points to https://aka.ms/gcmcore-autodetect On this page, the possibility to disable the autodetection completely was brought to my attention. After running I feel that the error message pointing to a page explaining how this can be turned off makes the impact less severe, as turning autodetection off mitigates the problem that the stored credentials are not returned. After digging around, the new behavior (improved error message) seems to have been introduced in 537c0ba I do however believe that it might be better if stored credentials would be returned, even if the autodetect fails. I hope that this update might help to reassess the impact of this bug. |
Add support for automatically sending client TLS certificates using the Git configuration setting 'http.sslAutoClientCert'. This setting is currently only [present in Git for Windows](https://github.com/git-for-windows/git/blob/c8edb521bdabec14b07e9142e48cab77a40ba339/http.c#L906-L910), and there is only respected when the SSL backend is "schannel". Fixes #369
Support for automatically selecting the correct client TLS certificates on Windows has been merged to the |
Since I just ran into this issue myself and was about to write a comment here stating it is still not working for me, I just want to state for anyone else coming here, that one still has to do the configuration posted by @dscho above: Hope this saves somebody some time. |
With git 2.28.0 using schannel we were able to use client certificates to connect to HTTPS servers secured with mutual TLS with certificates in the user certificate store. This appears to no longer be possible with GCMC. Is there an option to use these certificates, especially hardware certificates access through the personal certificate store.
The text was updated successfully, but these errors were encountered: