Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certificate problem while cloning a https url with git

Tags:

git

curl

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 false

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?

like image 621
Mert Caliskan Avatar asked Aug 28 '10 09:08

Mert Caliskan


2 Answers

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.

like image 182
Mert Caliskan Avatar answered Sep 28 '22 00:09

Mert Caliskan


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.

like image 37
jj1bdx Avatar answered Sep 28 '22 00:09

jj1bdx