GPG signature verification error

  • What Grafana version and what operating system are you using?
    Grafana v12.0.1+security-01
    OS: AlmaLinux release 8.10

  • What are you trying to achieve?
    Grafana update via dnf/yum

  • How are you trying to achieve it?
    dnf update grafana -y

  • What happened?
    Received an error message: “Error: Failed to download metadata for repo ‘grafana’: repomd.xml GPG signature verification error: Bad GPG signature”

  • What did you expect to happen?
    Grafana update…

  • Did you follow any online instructions? If so, what is the URL?
    Install Instructions: Install Grafana on RHEL or Fedora | Grafana documentation

    NOTE: Looking at https://rpm.grafana.com/ I see a message that says “On 2025-08-22 the lifetime of the key was extended by 2 years.” According to my DNF logs, the problem began on August 23, 2025.

    Troubleshooting Steps:

    Removed GPG keys. Added GPG as instructed. Issue still comes up.

    • rpm -q gpg-pubkey --qf ‘%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n’ | grep grafana
    • rpm -e gpg-pubkey-<>

I had the same issue, and it is due to what you noted about the key being extended for 2 years. The key was reissued and your DNF is caching the old (now expired) key. On https://rpm.grafana.com there is a link to an old blog post that has instructions on clearing the key from the cache: Grafana Labs update regarding CircleCI security updates | Grafana Labs

For me, this was gpg --batch --homedir /var/cache/dnf/grafana-c07ad55cac60fa26/pubring --delete-key B53AE77BADB630A683046005963FA27710458545 but your cache dir may be slightly different.

After that, just run dnf makecache and it should work.

Thank you, @jcox10 this helped resolve my issue.

Hi,

I tried following the instructions in the post above.

However, I keep getting the following message:

ssh_db-grafana@srv-DB-Grafana:~$ mkdir -p /etc/apt/keyrings/
ssh_db-grafana@srv-DB-Grafana:~$ wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor > /etc/apt/keyrings/grafana.gpg
-bash: /etc/apt/keyrings/grafana.gpg: Permission denied
ssh_db-grafana@srv-DB-Grafana:~$ sudo wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor > /etc/apt/keyrings/grafana.gpg
-bash: /etc/apt/keyrings/grafana.gpg: Permission denied
ssh_db-grafana@srv-DB-Grafana:~$ sudo mkdir -p /etc/apt/keyrings/
ssh_db-grafana@srv-DB-Grafana:~$ sudo wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor > /etc/apt/keyrings/grafana.gpg
-bash: /etc/apt/keyrings/grafana.gpg: Permission denied

As you can see, I also tried using ‘sudo’, but without success.