7

Sorry the language is german.

So I added the repository of the docker:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

But I get Errors when I update the sources:

sudo apt-get update

Ign:3 https://download.docker.com/linux/ubuntu bionic InRelease

Fehl:4 https://download.docker.com/linux/ubuntu bionic Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 54.230.93.95 443]

Holen:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]

OK:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease

Paketlisten werden gelesen... Fertig E: Das Depot »https://download.docker.com/linux/ubuntu bionic Release« enthält keine Release-Datei.

N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.

N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).

9
  • Have you read docs.docker.com/install/linux/docker-ce/ubuntu ? RTFD
    – KamilCuk
    Commented Feb 27, 2019 at 9:19
  • yes sure. as you see the repository cannot refreshed and i Need the repository to download docker-ce , because without the repository it Shows me this: after writing sudo apt-get install docker-ce i get a Messages says that docker-ce does not exist and try from anothe packet source
    – Hozan
    Commented Feb 27, 2019 at 11:17
  • Certificate verification failed did you follow the steps in Install using the repository ?? curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - and apt-key fingerprint 0EBFCD88 ?
    – KamilCuk
    Commented Feb 27, 2019 at 11:27
  • 1
    yes i did that .first i get OK and when i check the Fingerprint : apt-key fingerprint 0EBFCD88 pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid [ unknown] Docker Release (CE deb) <[email protected]> sub rsa4096 2017-02-22 [S] it seems all good
    – Hozan
    Commented Feb 27, 2019 at 11:57
  • more imformatiom 'curl -kv -fsSL download.docker.com/linux/ubuntu/gpg | sudo apt-key add -' Trying 54.192.130.134... Connected to download.docker.com (54.192.130.134) port 443 (#0) ALPN, offering h2 successfully set certificate verify locations: ALPN, server did not agree to a protocol** Server certificate: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.] GET /linux/ubuntu/gpg HTTP/1.1 Host: download.docker.com < HTTP/1.1 200 OK * Connection #0 to host download.docker.com left intact OK
    – Hozan
    Commented Feb 27, 2019 at 12:52

1 Answer 1

23

For those still having this issue, here is a solution which I gleaned from the Ubuntu manpages.

The OP's post indicates a certificate verification error:

Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 54.230.93.95 443]

I was having similar issues on a VM which sits behind a corporate proxy. The proxy acts as a man-in-the-middle, decrypting and re-encrypting traffic as it flows through the proxy. Even though I had the trusted certificate installed on my VM for the proxy, this error was still happening, caused by an invalid OCSP response. To fix it, I ran this command:

touch /etc/apt/apt.conf.d/99verify-peer.conf \
&& echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"

This disables apt's OCSP verification, and is not recommended.

I chose a different solution, which may not be available to others. Our company maintains a non-decrypting proxy for use cases like this, so I switched to using it.

4
  • Could you tell me, how to turn on certificate verification?
    – Eugene W.
    Commented Jan 6, 2022 at 10:28
  • Since I don't know how it got turned off for you, I can only suggest that you try this command: touch /etc/apt/apt.conf.d/99verify-peer.conf \ && echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer true }"
    – WPWoodJr
    Commented Jan 12, 2022 at 17:15
  • 2
    worked like a charm. thanks @WPWoodJr Commented Jan 19, 2022 at 2:18
  • this is very extreme to assume that a proxy strips TLS header. I have a similar error and I tried curl -v https://download.docker.com and I see SSL certificate verify ok. this error can occur, and most likely occurs, for other reasons
    – Nir O.
    Commented May 18, 2023 at 10:08

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.