Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify CAFile path inline with the GIT command?

Tags:

git

https

I'm trying to clone a repository over https and for some reason even with my local config which says where to take CAFile it tries to use value from the global config.

local config:

[http]
    sslCAInfo = c:/../cacert-client.pem

global config:

[http]
    sslCAinfo = /bin/curl-ca-bundle.crt

when I'm executing my clone command I see that instead of the local value it is trying to use the global CAFile value.

How to specify http.sslCAinfo inline with the git clone command?

like image 253
Alexey Strakh Avatar asked Apr 06 '14 11:04

Alexey Strakh


1 Answers

c:/your/path/to/cacert-client.pem should work ,supposing that the '/../' in your question stands for your/path/to (otherwise c:/../xx points to a non-existent path).

If it doesn't work, you can try the other syntax:

git config http.sslCAinfo /c/your/path/to/cacert-client.pem

You also can set GIT_CURL_VERBOSE to 1 and see more of what git is using.

Getting that path right (either by git config, or with the environment variable GIT_SSL_CAINFO) is bettern than the alternative: GIT_SSL_NO_VERIFY=true or git config --global http.sslVerify false.

like image 109
VonC Avatar answered Nov 15 '22 09:11

VonC