2

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?

iHateGit
  • 21
  • 3

1 Answers1

1

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).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have those 3 things and am using absolute paths. The only thing I can think of is when I call 'git config --list' I see that the 'http.sslcainfo' shows up twice, one for 'absolutepath/someCa.cer', and one that points to C/Program Files/Git/... however when I call 'git config --global --get-all http.sslcainfo' it only returns 'absolutepath/someCa.cer' so I don't think that's the issue – iHateGit Jun 02 '20 at 19:38
  • @iHateGit Check with `git config -l --show-origin --show-scope` (and Git for Windows 2.27) – VonC Jun 02 '20 at 19:43
  • @iHateGit Try also with `https://Token@bitbucket.../` (without name) – VonC Jun 02 '20 at 19:44