Failed to download metadata...Bad GPG Signature

Trying to install Opensearch 2.15 and I’m getting the below error…

yum install opensearch
OpenSearch 2.x                                                                                                                                                           1.6 kB/s | 498  B     00:00    
OpenSearch 2.x                                                                                                                                                            53 kB/s | 4.2 kB     00:00    
OpenSearch 2.x                                                                                                                                                           2.9 kB/s | 498  B     00:00    
Error: Failed to download metadata for repo 'opensearch-2.x': repomd.xml GPG signature verification error: Bad GPG signature

I’m running AlmaLinux 8.10 and did have Opensearch installed on here before, but it was an older version… 2.8 I think it was. Initially, I was trying to just update OS to 2.15 but I was getting that same error and ended up yum removing it, thinking I could just start over.

Once removed, I followed the instructions here:

but am getting that error.

Any help would be greatly appreciated.

Hi @cawFEHman,

I have installed it in my lab with no issues following the instructions above with Alma 8.10 and OpenSearch 2.15:


image

Could you share the output of:

ls -l /etc/yum.repos.d/
cat /etc/yum.repos.d/opensearch-2.x.repo

Best,
mj

thank you for the time… here’s the outputs…

ls -l /etc/yum.repos.d/
total 40
-rw-r--r--. 1 root root  943 May 22 10:49 almalinux-ha.repo
-rw-r--r--. 1 root root  905 May 22 10:49 almalinux-nfv.repo
-rw-r--r--. 1 root root  885 May 22 10:49 almalinux-plus.repo
-rw-r--r--. 1 root root  963 May 22 10:49 almalinux-powertools.repo
-rw-r--r--. 1 root root 2666 May 22 10:49 almalinux.repo
-rw-r--r--. 1 root root 1041 May 22 10:49 almalinux-resilientstorage.repo
-rw-r--r--. 1 root root  871 May 22 10:49 almalinux-rt.repo
-rw-r--r--. 1 root root  928 May 22 10:49 almalinux-saphana.repo
-rw-r--r--. 1 root root  873 May 22 10:49 almalinux-sap.repo
-rw-r--r--. 1 root root  242 Jun 27 09:36 opensearch-2.x.repo

cat /etc/yum.repos.d/opensearch-2.x.repo
[opensearch-2.x]
name=OpenSearch 2.x
baseurl=https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/yum
enabled=1
repo_gpgcheck=1
gpgcheck=1
gpgkey=https://artifacts.opensearch.org/publickeys/opensearch.pgp
autorefresh=1
type=rpm-md

What dose the below return in the last 2 lines?


sudo yum list opensearch --showduplicates
yum list opensearch --showduplicates
OpenSearch 2.x                                                                                                                                                           2.6 kB/s | 498  B     00:00    
OpenSearch 2.x                                                                                                                                                            74 kB/s | 4.2 kB     00:00    
OpenSearch 2.x                                                                                                                                                           4.0 kB/s | 498  B     00:00    
Error: Failed to download metadata for repo 'opensearch-2.x': repomd.xml GPG signature verification error: Bad GPG signature

Fixed it… found this article on RedHat… (sign in required)

One of the responses said to run

sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade

Ran those and when I ran the last command it asked to accept the new GPG key…

and VOILA! am able to install.

Thanks for your help

1 Like

Hi @cawFEHman,

Thanks for sharing your solution!

Best,
mj