I'm trying to install Docker on Ubuntu 20.04 LTS. I'm using the official docs. I have done it before without problems.
Here's the error after running sudo apt-get update
:
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ir.archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://ir.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 https://download.docker.com/linux/ubuntu focal InRelease [52.1 kB]
Hit:7 http://ir.archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 https://download.docker.com/linux/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I saw How do I fix the GPG error "NO_PUBKEY"? but I couldn't solve the problem.