CA Certificates Not Recognized

I've been trying to get CA Certs installed because I'm getting errors when trying to use rosdep init which makes calls to "raw.githubusercontent.com". If I do the same call with wget I'll get the same error:

ERROR: cannot verify raw.githubusercontent.com's certificate, issued by ‘CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
  Unable to locally verify the issuer's authority.

I have installed ca-certificates. I also tried this on a fresh install and everything worked fine. However, I cannot reinstall on the machine I am on at the moment, is there a way to resolve this some other way?


Solution 1:

I don't have any experience with rosdep but can you try to update your certificates with;

sudo update-ca-certificates -f

If that doesn't work and you sure rosdep is using wget can you try to add this line to your ~/.wgetrc

check_certificate = off

It should ignore certificate errors afterwards. It can be GitHub issue so can't comment on that. I can wget files from raw.githubusercontent.com without any issues tho.

Solution 2:

In the end adding this env var to my ~.bashrc file made the ROS calls work:

export SSL_CERT_DIR=/etc/ssl/certs