开发者

Certificate problem while cloning a https url with git

I have git version 1.7.2.2 and curl 7.21.1 on my MacOS. I'm trying to clone an url like:

git clone https:// repositories.mydomain.com/myproject/myproject.git myproject

but getting,

error: unable to use client certificate (no key found or wrong pass phrase?) while accessing https://repositories.mydomain.com/myproject/myproject.git/info/refs

I tried

git config --global http.sslVerify fa开发者_如何学JAVAlse

to ignore SSL but that didn't work. I also put CA cert into /opt/local/share/curl/curl-ca-bundle.crt but that didn't work also.

any ideas?


found the culprit

there was a environment variable named GIT_SSL_CERT which was pointing out to a jks. so it was overriding all my configs.


To use an alternate certificate file on Git:

git config --global http.sslcainfo latest/ca/path

To obtain an alternate certificate file, refer to: http://curl.haxx.se/docs/caextract.html and get cacert.pem file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜