Topic: Error: Failed to download metadata ... Bad GPG signature

I'm trying to install the Remi php 8.2 repos for a new Fedora 38 installation.

Following the wizard when I install the modular repos and try a dnf update I get these GPG errors and the repos are ignored

cd /etc/yum.repos.d
ls remi*
    --
dnf install remi-release-38-3.fc38.remi.noarch
ls -al remi*
 -rw-r--r-- 1 root root 535 Aug 21 09:57 remi-debuginfo.repo
 -rw-r--r-- 1 root root 847 Aug 21 09:57 remi-modular.repo
 -rw-r--r-- 1 root root 893 Aug 21 09:57 remi-modular-test.repo
 -rw-r--r-- 1 root root 451 Aug 21 09:57 remi.repo
 -rw-r--r-- 1 root root 410 Aug 21 09:57 remi-test.repo

ls -al /etc/pki/rpm-gpg/RPM-GPG-KEY-remi*
    -rw-r--r-- 1 root root 1.4K Mar 23  2017 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
    -rw-r--r-- 1 root root 3.1K Mar 23  2017 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2017
    -rw-r--r-- 1 root root 3.1K Jan 16  2018 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2018
    -rw-r--r-- 1 root root 3.2K Aug 19  2019 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2019
    -rw-r--r-- 1 root root 3.2K Feb 17  2020 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2020
    -rw-r--r-- 1 root root 3.2K Jan  4  2021 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2021
    -rw-r--r-- 1 root root 3.2K Feb 15  2022 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2022
    -rw-r--r-- 1 root root 3.2K Jan  5  2023 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi2023
    lrwxrwxrwx 1 root root   20 Oct 29 20:00 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi-38 -> RPM-GPG-KEY-remi2023
    lrwxrwxrwx 1 root root   20 Oct 29 20:00 /etc/pki/rpm-gpg/RPM-GPG-KEY-remi-39 -> RPM-GPG-KEY-remi2023

dnf update --refresh
    ...
    Remi's RPM repository - Fedora 38 - x86_64                                    967  B/s | 833  B     00:00
    Remi's RPM repository - Fedora 38 - x86_64                                    3.0 MB/s | 3.1 kB     00:00
    Remi's RPM repository - Fedora 38 - x86_64                                    1.4 kB/s | 833  B     00:00
    Error: Failed to download metadata for repo 'remi': repomd.xml GPG signature verification error: Bad GPG signature
    Remi's Modular repository - Fedora 38 - x86_64                                1.1 kB/s | 833  B     00:00
    Remi's Modular repository - Fedora 38 - x86_64                                3.0 MB/s | 3.1 kB     00:00
    Remi's Modular repository - Fedora 38 - x86_64                                1.6 kB/s | 833  B     00:00
    Error: Failed to download metadata for repo 'remi-modular': repomd.xml GPG signature verification error: Bad GPG signature
    00:00
    Ignoring repositories: remi, remi-modular
    ...

How do you get the GPG verification working?
Am I missing a step or doing something wrong?

Re: Error: Failed to download metadata ... Bad GPG signature

I am getting the same message with rhel 9.2. I installed it on another server last week, but this week both servers I'm trying to install this on are giving me this when I try to do an update with dnf. Did the GPG key expire or get revoked?

Remi's Modular repository for Enterprise Linux 9 - x86_64 663  B/s | 833  B     00:01
Remi's Modular repository for Enterprise Linux 9 - x86_64 1.6 MB/s | 3.1 kB     00:00
Remi's Modular repository for Enterprise Linux 9 - x86_64 2.0 kB/s | 833  B     00:00
Error: Failed to download metadata for repo 'remi-modular': repomd.xml GPG signature verification error: Bad GPG signature

Re: Error: Failed to download metadata ... Bad GPG signature

Everything is OK here

$ cd enterprise/9/modular/x86_64/repodata
$ gpg --verify repomd.xml.asc repomd.xml
gpg: Signature made Mon Oct 30 15:32:26 2023 CET
gpg:                using RSA key B1ABF71E14C9D74897E198A8B19527F1478F8947
gpg: Good signature from "Remi's RPM repository (https://rpms.remirepo.net/) <remi@remirepo.net>" [unknown]
Primary key fingerprint: B1AB F71E 14C9 D748 97E1  98A8 B195 27F1 478F 8947

Could be a mirror issue, but I rather think of a cache/proxy issue
The 2 files need to match

You have to fix your proxy configuration to avoid these files to be cached

A Workaround is to disable repo_gpgcheck in the repository configuration file
(don't disable gpgcheck)

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: Error: Failed to download metadata ... Bad GPG signature

It must have been a caching issue of some sort because it is working today. Sorry for the alarm.