iHateGit
iHateGit

Reputation: 21

bitbucket git clone results in 'fatal: unable to access ... could not load PEM client certificate, OpenSSL error error:02001003...'

I am trying to clone a git repo via the URL and have the command as follows:

git clone https://LastName%20FirstName%20CertNumber:Token@bitbucket.../someProject/someProject.git 

but keep running into the same error.

Clone failed: unable to access 'https://LastName%20FirstName%20CertNumber:Token@bitbucket.../someProject/someProject.git/': could not load PEM client certificate, OpenSSL error error:02001003:system library:fopen:No such process, (no key found, wrong pass phrase, or wrong file format?)

I checked my git config and the properties are all set properly:

http.sslcert=someCert.crt
http.sslkey=someKey.key
http.sslcainfo=someCa.cer
http.sslverify=true
http.sslcertpasswordprotected=true

What could be giving me this error?

Upvotes: 2

Views: 1277

Answers (1)

VonC
VonC

Reputation: 1323803

The key part of the error message is:

no key found, wrong pass phrase, or wrong file format?

As mentioned here:

For a SSL verification you need:

  • a cert in PEM format,
  • its associated private key (in openssl format) and
  • the root certificate of the certification authoritity that signed your certificate in pem format.

Maybe one of those elements is missing (try and use full absolute path for those files, as seen here), or is in the wrong format (like the someCa.cer file, which might or might not be in PEM format).

Upvotes: 1

Related Questions