Score:0

What could be the reason that `apt update` says certificate is NOT trusted whereas curl says `SSL certificate verify ok`

cn flag

I am trying to add docker to my Debian 11 bullseye installation. until now, I have ran -

apt clean
apt update
update-ca-certificates
apt-get install -y ca-certificates
apt reinstall ca-certificates

but when I run apt update I keep getting

Err:4 https://download.docker.com/linux/debian bullseye InRelease              
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 2600:9000:2113:5000:3:db06:4200:93a1 443]

however, when I check the said repo using curl like so: curl -vI 'https://download.docker.com' the output indicates

* Server certificate:
*  subject: CN=*.docker.com
*  start date: Feb 22 00:00:00 2023 GMT
*  expire date: Nov 30 23:59:59 2023 GMT
*  subjectAltName: host "download.docker.com" matched cert's "*.docker.com"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
*  SSL certificate verify ok

on what grounds does apt command reckon that the website certificate is not trusted, whereas curl thinks it can be trusted?

A.B avatar
cl flag
A.B
Btw, much simpler: `apt install docker.io`
pt flag
The `docker.io` package available in Debian 11 is substantially older than the `docker-ce` package you get when using the official Docker apt repository.
in flag
Is apt configured to use a proxy?
Nir O. avatar
cn flag
@GeraldSchneider I am not sure how to check this, anyway there is no ` /etc/apt/apt.conf` file if that answers
djdomi avatar
za flag
you have to read the instructions on how to use apt, apt by default don't allow any non trusted repository and therefore you need to add the trust by reading the manual provided by docker
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.