1

I had installed docker in my ubuntu system a few months back. That time it was working fine. But today I saw this error while running. apt-get update command.

Failed to fetch https://download.docker.com/linux/ubuntu/dists/trusty/stable/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/trusty/edge/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Some index files failed to download. They have been ignored, or old ones used instead

The docker pull command was not running. I uninstalled docker by using the below command.

sudo apt-get remove docker docker-engine docker-ce docker.io

but still facing the same issue.

Also tried to run

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

according to the docker tutorial. But getting the below error:

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
gpg: no valid OpenPGP data found.
  • 2
    Did you follow step 3 (Add Docker’s official GPG key) of the installation tutorial ? – pLumo Dec 10 '18 at 9:41
  • I did. But getting SSL certificate problem (added the error message) – Arijit Panda Dec 10 '18 at 9:45
  • Are you behind a proxy that might be redirecting that website ... ? – pLumo Dec 10 '18 at 9:46
  • is it due to the internet setting? Although, I can download the gpg file via web browser. – Arijit Panda Dec 10 '18 at 9:52
  • did you accept some self-signed certificate when downloading via browser ? – pLumo Dec 10 '18 at 9:55
0

the problem is about repository being in /etc/apt/sources.list.d folder or directly in /etc/apt/sources.list file. Once you remove it from there you should be good to go.

However, I'd suggest fixing missing GPG keys as explained in https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository as user Rovo sugested

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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