Fix for NO_PUBKEY noble InRelease' is not signed on Fresh Ubuntu 24.04

I spent more than 6 hours straight on this (April 2026) and not even GPT nor Gemnin could fix it.
But someone from these forums found it and helped us, back in Sep 2024.

ISSUE:
On a fresh cloud droplett Ubuntu 24.04, updated and following the exact steps, it fails to install docker-ce.
dockers official docs - fail.
digitalocean ubuntu-22-04 - fail.

ERRORS:
This is some, not all, enough for a searching person to be helped tho.
Package docker-ce is not available, but is referred to by another package.
Package docker-ce-cli is not available, but is referred to by another package.
E: Package ‘docker-ce’ has no installation candidate
E: Package ‘docker-ce-cli’ has no installation candidate

and
W: GPG error: https download docker com/linux/ubuntu noble 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 noble InRelease’ is not signed.

THE FIX:
https://forums.docker.com/t/installing-docker-on-buster-e-package-docker-ce-has-no-installation-candidate/108397/15
About 3/4 down is lrchuanzai leonli. They wrote this, and it worked:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o  /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Thank you kind sir, this is still relevant 2 years later.

I am surprised this is necessary. the official instructions contain those two steps as well (slightly different commands though), since Ubuntu 24 (and Debian13) switch to the DEB822 source format for apt repository configs. Afaik, the old and new format can co-exist without issue.

Just to be sure: you followed the installation instructions for Ubuntu, and you still got the NO_PUBKEY error?

Thank you. I couldnt paste in the url’s to the links i followed.
Yes, I followed 2 OFFICIAL sites.
The VM was reset and i started from scratch at least 5 times.

I dont know why the digitalocean ubuntu 24.4 install fails with docker when I follow the official instructions.

But after performing at LEAST 6 hours of labour into this, I thought if my time could benefit even one person, it would be worth posting the fix here.

Your mindset is very appreciated. That’s what makes up a community :slight_smile:

I am curious what official sites you used. It would be beneficial if the information you shared in your first post would flow back into the docs you followed.

Sometimes it takes time for documentation to catch up with reality…