It is not a duplicate but a similar question to this one: Multiple GitHub Accounts & SSH Config
I need to access several servers using different https client certificates (and obviously using different identities)
when I access the same servers using a browser, the browser asks which of the available client certificates I want to use.
when I try to clone using
git clone https://user@server.domain.tld/path/to/repository.git
git just picks the "first available" of the matching certificates, which is the wrong one and doesnt get accepted.
if I remove the wrong certificate from the windows certificate store, until the correct one becomes the first pick, everything works as expected.
question how can I tell git, which certificate to use (I could provide the serial number or the fingerprint of the certificate that is to be used)
If git would let me choose the certificate interactively, this would be fine as well
in case there is a difference: windows 10, git version 2.13.3.windows.1
UPDATE 9.9.2018: updated git to 2.18.0 => same behaviour
ADDITIONAL INFO apparently, I am using the schannel
sslBackend which is using the windows certificate stores. My understanding is that http.sslKey
can be configured to point to a file containing the private key.
As my client certificate is located on a smart card, there is no way to extract the private key part from the card.