Question

I'm using a remote git repository via https, which has a self-signed certificate. To make git aware of the self-signed certificates, I have the following in my .gitconfig:

[http]
sslCAInfo = /home/user/myselfsigned.cert

This works fine, but when I add another remote with a CA signed certificate, git (or curl?) wrongly tries to use the cert file for this remote, too. What is the correct syntax to apply the certificate to a specific remote?

Était-ce utile?

La solution

I think that question has answer to your question as well:

git config http."https://code.example.com/".sslCAInfo <downloaded certificate>.pem

And gitconfig file will be smth like:

[http "https://code.example.com/"]
    sslCAinfo = /path/to/<downloaded certificate>

Although it doesn't work for me yet...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top