yum/dnf update fails with warning "Public Key for rpm is not installed", "Error: GPG check FAILED"

Solution Verified - Updated -

Issue

  • yum/dnf update fails with warning "Public Key for rpm is not installed"

    Public key for package.<version>.rpm is not installed. Failing package is: Package.<version>
    GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    The downloaded packages were saved in cache until the next successful transaction.
    You can remove cached packages by executing 'yum clean packages'.
    Error: GPG check FAILED
    

    OR

    GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    The GPG keys listed for the "Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)" repository are already installed but they are not correct for this package.
    Check that the correct key URLs are configured for this repository. Failing package is: gnupg2-2.4.5-3.el10_1.x86_64
    GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    The downloaded packages were saved in cache until the next successful transaction.
    You can remove cached packages by executing 'dnf clean packages'.
    Error: GPG check FAILED
    

Environment

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content