yum or dnf refuses the Jenkins package after the signing key changed
Fix it fast
Most common cause, 1 of 3Only the previous Jenkins key is imported
Import the current key for your release line, then upgrade.
# LTS
sudo rpm --import https://pkg.jenkins.io/rpm-stable/jenkins.io-2026.key
# weekly
sudo rpm --import https://pkg.jenkins.io/rpm/jenkins.io-2026.key
sudo dnf upgrade jenkins # or: sudo yum upgrade jenkinsShort answer
yum and dnf say the public key for jenkins-<version>.noarch.rpm is not installed because Jenkins replaces its repository signing key every 3 years, and packages from weekly 2.543 and LTS 2.541.1 on are signed with jenkins.io-2026.key. Import it with sudo rpm --import https://pkg.jenkins.io/rpm-stable/jenkins.io-2026.key, then run the upgrade again. Applies to LTS 2.580.2.
Which cause do you have?
Look at whether the Jenkins repo file names a key URL, and which public keys rpm already holds. No gpgkey line plus the 'Public key ... is not installed' message is cause 1; a gpgkey line plus 'already installed but they are not correct' is cause 2. On Debian or Ubuntu go straight to cause 3.
grep -E "^(baseurl|gpgkey)" /etc/yum.repos.d/jenkins.repo
rpm -q gpg-pubkeyThen find the line you see in this list and open its fix:
- 1Only the previous Jenkins key is imported
jenkins.repo has no gpgkey= line, and the upgrade ends with 'Public key for jenkins-<version>.noarch.rpm is not installed' without offering to import a key - 2The repo file still points gpgkey at an old key file
dnf prints 'GPG key at ... is already installed' for the listed key and then stops with 'already installed but they are not correct for this package' - 3On Debian or Ubuntu, the keyring file holds the old key
apt-get update warns that signatures couldn't be verified with NO_PUBKEY 7198F4B714ABFC68 and calls the Jenkins repository not signed
What does the error look like?
Public key for jenkins-2.387.2-1.1.noarch.rpm is not installedThe GPG keys listed for the "Jenkins-stable" repository are already installed but they are not correct for this package.Check that the correct key URLs are configured for this repository.NO_PUBKEY 7198F4B714ABFC68
Cause 1 of 3
Only the previous Jenkins key is imported
You seejenkins.repo has no gpgkey= line, and the upgrade ends with 'Public key for jenkins-<version>.noarch.rpm is not installed' without offering to import a key
Check
dnf stops with this message when the package's signature belongs to a key missing from the rpm database and the repository names no gpgkey it could import from. Jenkins started signing with a new repository key in December 2025 for weekly 2.543 and in January 2026 for LTS 2.541.1, so a server that only ever imported the older key cannot check newer packages.
sudo dnf upgrade jenkins 2>&1 | grep -i "public key"Fix
Import the current key for your release line, then upgrade. The LTS line reads from rpm-stable; the weekly line reads from rpm.
# LTS
sudo rpm --import https://pkg.jenkins.io/rpm-stable/jenkins.io-2026.key
# weekly
sudo rpm --import https://pkg.jenkins.io/rpm/jenkins.io-2026.key
sudo dnf upgrade jenkins # or: sudo yum upgrade jenkinsVerify
The upgrade finishes and rpm reports the new Jenkins version.
rpm -q jenkinsConfirmed by jenkins.io
Cause 2 of 3
The repo file still points gpgkey at an old key file
You seednf prints 'GPG key at ... is already installed' for the listed key and then stops with 'already installed but they are not correct for this package'
Check
dnf raises this error when every key listed in the repository's gpgkey= line is already in the database and none of them signed the package. Its own text says to check the key URLs configured for the repository, so the .repo file is the thing to fix, not the package.
grep -n "gpgkey" /etc/yum.repos.d/jenkins.repoFix
Download the repo file again from the Jenkins installation guide. The current file for the LTS line sets baseurl to https://pkg.jenkins.io/rpm-stable and gpgkey to that repository's repodata/repomd.xml.key, with gpgcheck and repo_gpgcheck on. Use pkg.jenkins.io/rpm/jenkins.repo for weekly releases.
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/rpm-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/rpm-stable/jenkins.io-2026.key
sudo dnf clean all
sudo dnf upgrade jenkinsVerify
dnf reads the Jenkins repository without a GPG prompt that fails, and the package installs.
sudo dnf info jenkinsConfirmed by raw.githubusercontent.com
Cause 3 of 3
On Debian or Ubuntu, the keyring file holds the old key
You seeapt-get update warns that signatures couldn't be verified with NO_PUBKEY 7198F4B714ABFC68 and calls the Jenkins repository not signed
Check
The same key change hits apt. The signed-by option in /etc/apt/sources.list.d/jenkins.list names the keyring file apt trusts for Jenkins; depending on the install date it is /etc/apt/keyrings/jenkins-keyring.asc or /usr/share/keyrings/jenkins-keyring.asc. That file still contains the previous key.
grep -o 'signed-by=[^] ]*' /etc/apt/sources.list.d/jenkins.listFix
Write the current key into the file that signed-by names. Use debian-stable for LTS and debian for weekly. If the grep printed nothing, the repository was added with apt-key; create /etc/apt/keyrings, download the key there and rewrite jenkins.list with a signed-by entry.
sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2026.key
sudo apt-get update
sudo apt-get install --only-upgrade jenkinsVerify
apt-get update shows no GPG error for pkg.jenkins.io, and dpkg reports the new version.
dpkg-query --show jenkinsConfirmed by jenkins.io
How do I stop it coming back?
- Add the key import to the same provisioning script or Ansible role that writes the Jenkins repo file, so new servers always get both.
- Follow the Jenkins blog or changelog for repository signing key announcements; the key is replaced on a 3-year cycle.
- Never switch off gpgcheck to get past the error, since that removes the check that the package really comes from Jenkins.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.