1

I am trying to clone a repository from bitbucket.org to my Raspberry Pi using

git clone https://[email protected]/MyName/mygit.git

Git outputs the following, if i add GIT_CURL_VERBOSE=1 in front of it:

Cloning into 'mygit'...
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 2401:1d80:1010::150...
* 0x1614658 is at send pipe head!
* STATE: CONNECT => WAITCONNECT handle 0x161cfc0; (connection #0)
* Connected to bitbucket.org (2401:1d80:1010::150) port 443 (#0)
* Connected to bitbucket.org (2401:1d80:1010::150) port 443 (#0)
* error reading ca cert file /etc/ssl/certs/ca-certificates.crt (Base64 unexpected header error.)
* Closing connection #0
* Expire cleared
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 2401:1d80:1010::150...
* 0x1614658 is at send pipe head!
* STATE: CONNECT => WAITCONNECT handle 0x161cfc0; (connection #0)
* Connected to bitbucket.org (2401:1d80:1010::150) port 443 (#0)
* Connected to bitbucket.org (2401:1d80:1010::150) port 443 (#0)
* error reading ca cert file /etc/ssl/certs/ca-certificates.crt (Base64 unexpected header error.)
* Closing connection #0
* Expire cleared
error: Problem with the SSL CA cert (path? access rights?) while accessing https://[email protected]/MyName/mygit.git/info/refs
fatal: HTTP request failed

2 Answers 2

1

Check your ca-certificates.crt file for corruption. You shouldn't get the Base64 error message:

error reading ca cert file /etc/ssl/certs/ca-certificates.crt (Base64 unexpected header error.)

You may need to install the ca-certificates package and run sudo update-ca-certificates which creates a new /etc/ssh/certs/ca-certificates.crt file.

2

Running update-ca-certificates was not enough in my case... I had to force the ca-certificates package to reinstall, and then run update-ca-certificates in order to make it work.

Here's what worked for me...

  1. Reinstall ca-certificates
sudo apt-get install ca-certificates --reinstall

2- Update the CA certificate list

sudo update-ca-certificates
3
  • Can you please explain what's the difference to the other answer given two years before?
    – Ingo
    Commented Aug 3, 2019 at 16:59
  • Running update-ca-certificates was not enough in my case... I had to force the ca-certificates package to reinstall, and then run update-ca-certificates in order to make it work. HTH
    – ghigad
    Commented Aug 4, 2019 at 20:39
  • Can you please add the information to the answer? You can edit it. Please take the short Tour and visit the Help Center to get an idea how things work here.
    – Ingo
    Commented Aug 5, 2019 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.