docs icon indicating copy to clipboard operation
docs copied to clipboard

Instructions don't work on Debian 11 (public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8)

Open cschaba opened this issue 3 years ago • 1 comments

File: engine/install/debian.md

The Problem

The instructions don't work for Debian 11 (Bullseye). It shows the following error:

apt-get update
Hit:1 http://asi-fs-d.contabo.net/debian bullseye InRelease
Get:2 http://asi-fs-d.contabo.net/debian bullseye-updates InRelease [44.1 kB]                                                            
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease                                                             
Hit:4 https://download.docker.com/linux/debian bullseye InRelease                                                                        
Err:4 https://download.docker.com/linux/debian bullseye InRelease           
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Fetched 44.1 kB in 1s (63.7 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://download.docker.com/linux/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
W: Failed to fetch https://download.docker.com/linux/debian/dists/bullseye/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
W: Some index files failed to download. They have been ignored, or old ones used instead.

The fix

Instead of

  1. Add Docker’s official GPG key:
$ sudo mkdir -p /etc/apt/keyrings
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

it should be

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg

and then instead of

  1. Use the following command to set up the repository:
$ echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

it should be

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Reason

The keyring /etc/apt/keyrings/docker.gpg will not be used by apt. It must be /etc/apt/trusted.gpg.d/docker.gpg.

cschaba avatar Sep 23 '22 11:09 cschaba

i get the same error on Ubuntu instructions, following this guide and exchanging /etc/apt/keyrings/docker.gpg for /etc/apt/trusted.gpg.d/docker.gpg fixed it for me in ubuntu.

thesutex avatar Oct 04 '22 14:10 thesutex

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar Jan 03 '23 01:01 docker-robott

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

docker-robott avatar Feb 18 '23 03:02 docker-robott