# GPG Signature Verification Fails - Rocky Linux 9 BaseOS

**URL:** <https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [March 20, 2026, 9:44pm UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300 "2026-03-20T21:44:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksimmons4](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@ksimmons4](https://forums.rockylinux.org/u/ksimmons4)\
**Post date:** [March 20, 2026, 9:44pm UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/1 "2026-03-20T21:44:26Z")

</div>

Hello,

I’m running into an issue when attempting to update RL9 with `dnf update` or `dnf updateinfo`. The following error is output:

```auto
Importing GPG key 0x350D275D:
 Userid : "Rocky Enterprise Software Foundation - Release key 2022 <releng@rockylinux.org>"
 Fingerprint: 21CB 256A E16F C54C 6E65 2949 702D 426D 350D 275D
 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
Rocky Linux 9 - BaseOS 2.7 kB/s | 833 B 00:00
Error: Failed to download metadata for repo 'baseos': repomd.xml GPG signature verification error: Bad GPG signature

```

I’ve confirmed the GPG key is valid and matches the expected value. Running the command with `--nogpgcheck` works, which narrows it down to the GPG key portion of the process.

From the /etc/yum.repos.d/rocky.repo on servers that fail GPG verification:

```auto
[baseos]
name=Rocky Linux $releasever - BaseOS
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever$rltype
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
countme=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9

```

The key I see in the mirror was updated 3/17/2026, which might explain why this was working last week, but updates this week have failed.

[Rocky Linux Repository](https://dl.rockylinux.org/pub/rocky/9.7/BaseOS/x86_64/os/) → RPM-GPG-KEY-Rocky-9

---

<div class="post-metadata">

**Author:** ![QuantumDancer](https://avatars.discourse-cdn.com/v4/letter/q/779978/32.png) [@QuantumDancer](https://forums.rockylinux.org/u/QuantumDancer)\
**Post date:** [March 23, 2026, 7:36am UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/2 "2026-03-23T07:36:03Z")

</div>

We also face a similar issue. We are running multiple servers with Rocky Linux 9, and since last week we cannot install any new packages or perform updates due to the repo update failing with

```auto
Error: Failed to download metadata for repo 'baseos': repomd.xml GPG signature verification error: Bad GPG signature

```

Running

```bash
dnf clean all
dnf update

```

does not fix the issue.

---

<div class="post-metadata">

**Author:** ![jdieter](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/jdieter/32/5063_2.png) [@jdieter](https://forums.rockylinux.org/u/jdieter)\
**Post date:** [March 23, 2026, 9:38am UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/3 "2026-03-23T09:38:12Z")

</div>

This looks like an issue with the repodata signing, not the actual package signing. If you set `repo_gpgcheck=0`and leave `gpgcheck=1`in `/etc/yum.repos.d/rocky.repo,`you should see updates working again. The infra team is looking into it.

---

<div class="post-metadata">

**Author:** ![elguero](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/elguero/32/5760_2.png) [@elguero](https://forums.rockylinux.org/u/elguero)\
**Post date:** [March 24, 2026, 1:24pm UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/4 "2026-03-24T13:24:14Z")

</div>

@ksimmons4 and @QuantumDancer ,

Thank you for the report. This should be resolved now. Try doing a `dnf clean all` and then `dnf update` again. It should work now with repo gpg checking turned on.

---

<div class="post-metadata">

**Author:** ![RianKellyIT](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@RianKellyIT](https://forums.rockylinux.org/u/RianKellyIT)\
**Post date:** [March 30, 2026, 8:55am UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/5 "2026-03-30T08:55:06Z")

</div>

Worth noting for anyone hitting this later: this specific error is about repodata metadata signing, not package signing. The two are controlled by separate settings in the repo config:

- `gpgcheck=1` — verifies RPM package signatures (individual packages)
- `repo_gpgcheck=1` — verifies the repomd.xml metadata signature (the repo index itself)

When Rocky updates or re-signs their repo metadata, mirrors can briefly serve the old (now-invalid) signature during propagation. The cached copy in `/var/cache/dnf` compounds this because dnf trusts its cache.

If `dnf clean all && dnf update` doesn’t clear it immediately, try forcing a fresh pull from the primary mirror:

```  
dnf clean all  
dnf --disablerepo=‘\*’ --enablerepo=‘baseos,appstream’ update  
```

This bypasses any stale mirror and pulls direct. Usually resolves it within minutes of the upstream fix going out.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [May 29, 2026, 8:55am UTC](https://forums.rockylinux.org/t/gpg-signature-verification-fails-rocky-linux-9-baseos/20300/6 "2026-05-29T08:55:08Z")

</div>

Closed on May 29, 2026, 8:55am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
