Dnf gets 404 for RPM-GPG-KEY-Rocky-SIG-Cloud

dnf fails to install some packages with the following error:
Status code: 404 for https://dl.rockylinux.org/pub/sig/9/cloud/x86_64/cloud-kernel/RPM-GPG-KEY-Rocky-SIG-Cloud

It does appear that this key is missing. That is the key specified in the stock /etc/yum.repos.d/Rocky-CloudKernel.repo. I’m using the most recent GCP optimized rocky 9.5 image.

Workaround, install rocky-release-cloud and change pgpkey to local file.

dnf -y install rocky-release-cloud
sed -i 's|gpgkey=https://dl.rockylinux.org/pub/sig/9/cloud/x86_64/cloud-kernel|gpgkey=file:///etc/pki/rpm-gpg|' /etc/yum.repos.d/Rocky-CloudKernel.repo

That repo file does not appear to be managed by us nor any of our release packages. The provider of the image (I will assume google/GCE) doesn’t install rocky-release-cloud, which would provide the key and the correct repo files.

With that said, the GPG key is now there, so your dnf commands should now work.

There was no key in that dir, so changing the which one it points to in the .repo file, wouldn’t be of much use.

Thanks, I just noticed that the key is there now, as of this morning.

Weird that it was just 404’ing for 12+ hours.