How to specify CAFile path inline with the GIT command?
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
.
Related videos on Youtube
Alexey Strakh
Updated on June 26, 2022Comments
-
Alexey Strakh almost 2 years
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?
-
Alexey Strakh about 10 yearsGIT_SSL_CAINFO is what I was looking. Thank you! Other options were not working for me as git denies http requests and settings and modifying global config could break other repositories (connected with another git servers). Settings local value (git config --local http....) had no affect. GIT_CURL_VERBOSE shown that global value was used instead.