(I am on Ubuntu 14.10. uname -r => 3.16.0-31-generic)
apt-get update
Failed to fetch https://get.docker.com/ubuntu/dists/docker/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none.
git clone https://github.com/sdelements/lets-chat.git
I can't clone anything - fatal: unable to access 'https://github.com/sdelements/lets-chat.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none.
docker run hello-world
Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority.
ls /etc/ssl/certs/ca-certificates.crt -l
-rw-r--r-- 1 root root 1964 Mar 26 18:19 /etc/ssl/certs/ca-certificates.crt
Any clues would be appreciated.
Another cause might be your server time: check whether your server time is correct by running
date
. If it isn't, runsudo ntpdate -s ntp.ubuntu.com
. An incorrect server time can invalidate ssl certificatesIn my case, I restored a server snapshot. As a result, the server time was still set to snapshot-time. A reboot would probably solve this issue as well, as ubuntu tries to update the time on boot.
All of my ca certificates were missing from /usr/share/ca-certificates/*
re-installing the package put them back
If they are missing from that location, doing a force reloading will show the 0 of 0:
update-ca-certificates -f
apt-get install --reinstall ca-certificates