What Grafana version and what operating system are you using?
Grafana version : Latest
os : Linux
What are you trying to achieve?
We want to install the Alloy during the build step with our CI/CD pipeline.
How are you trying to achieve it?
We made this script and execute while build application
wget -q -O /tmp/gpg.key https://rpm.grafana.com/gpg.key && sudo rpm --import /tmp/gpg.key
if [ $? -ne 0 ]; then
echo "Failed to download or import GPG key."
exit 1
fi
echo "Setting up Grafana repository..."
echo -e '[grafana]\nname=grafana\nbaseurl=https://rpm.grafana.com\nrepo_gpgcheck=1\nenabled=1\ngpgcheck=1\ngpgkey=https://rpm.grafana.com/gpg.key\nsslverify=1\nsslcacert=/etc/pki/tls/certs/ca-bundle.crt' | sudo tee /etc/yum.repos.d/grafana.repo
if [ $? -ne 0 ]; then
echo "Failed to download or import GPG key."
exit 1
fi
echo "Installing Alloy..."
yum install -y alloy
if [ $? -ne 0 ]; then
echo "Failed to install Alloy."
exit 1
fi
What happened?
Occasionally, we encounter an error during the installation, specifically related to the GPG signature verification when downloading metadata from the Grafana repository. This happens intermittently, about 1 out of 10 times, and the error message is as follows:
- Error: Failed to download metadata for repo ‘grafana’: repomd.xml GPG signature verification error: Bad GPG signature
2025-03-12 00:58:44,768 P2310 [INFO] Amazon Linux 2023 repository 37 kB/s | 3.6 kB 00:00
2025-03-12 00:58:44,768 P2310 [INFO] Amazon Linux 2023 Kernel Livepatch repository 31 kB/s | 2.9 kB 00:00
2025-03-12 00:58:44,768 P2310 [INFO] Amazon Linux 2023 Kernel Livepatch repository 78 kB/s | 12 kB 00:00
2025-03-12 00:58:44,768 P2310 [INFO] grafana 7.4 kB/s | 712 B 00:00
2025-03-12 00:58:44,768 P2310 [INFO] grafana 71 kB/s | 2.4 kB 00:00
2025-03-12 00:58:44,768 P2310 [INFO] Importing GPG key 0x10458545:
2025-03-12 00:58:44,768 P2310 [INFO] Userid : "Grafana Labs <engineering@grafana.com>"
2025-03-12 00:58:44,768 P2310 [INFO] Fingerprint: B53A E77B ADB6 30A6 8304 6005 963F A277 1045 8545
2025-03-12 00:58:44,768 P2310 [INFO] From : https://rpm.grafana.com/gpg.key
2025-03-12 00:58:44,768 P2310 [INFO] grafana 9.4 kB/s | 712 B 00:00
2025-03-12 00:58:44,768 P2310 [INFO] Error: Failed to download metadata for repo 'grafana': repomd.xml GPG signature verification error: Bad GPG signature
2025-03-12 00:58:44,769 P2310 [INFO] Ignoring repositories: grafana
2025-03-12 00:58:44,769 P2310 [INFO] No match for argument: alloy
2025-03-12 00:58:44,769 P2310 [INFO] Error: Unable to find a match: alloy
2025-03-12 00:58:44,769 P2310 [INFO] Failed to install Alloy.
2025-03-12 00:58:44,769 P2310 [INFO] ------------------------------------------------------------
What did you expect to happen?
We want that this error would not occur intermittently, and the Alloy would be installed successfully without issues.
Is there something we are missing in the repository setup that could cause intermittent failures like this?
Are there any specific settings or network conditions we need to consider to prevent GPG signature verification errors?