Today, I wanted to update my CentOS 7.2 virtual machine, and this process stopped due to a GPG key error :

[root@puppetserver ~]# yum update
warning: /var/cache/yum/x86_64/7Server/puppetlabs-pc1/packages/puppet-agent-1.7.0-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ef8d349f: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1

The GPG keys listed for the "Puppet Labs PC1 Repository el 7 - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.

 Failing package is: puppet-agent-1.7.0-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1

What to do

Download the keyfile :

[root@puppetserver ~]# curl -L -o /tmp/RPM-GPG-KEY-puppet

Verify the keyfile :

[root@puppetserver ~]# gpg --with-fingerprint "/tmp/RPM-GPG-KEY-puppet"
pub  4096R/EF8D349F 2016-08-18 Puppet, Inc. Release Key (Puppet, Inc. Release Key) <>
      Key fingerprint = 6F6B 1550 9CF8 E59E 6E46  9F32 7F43 8280 EF8D 349F
sub  4096R/656674AE 2016-08-18 [expires: 2021-08-17]

We got the correct fingerprint 6F6B 1550 9CF8 E59E 6E46 9F32 7F43 8280 EF8D 349F as shown on Puppet Collection WEB page.

Copy this file :

[root@puppetserver ~]# cp /tmp/RPM-GPG-KEY-puppet /etc/pki/rpm-gpg/.

Now, “yum update” works well :

[root@puppetserver ~]# yum -y update
  kernel.x86_64 0:3.10.0-327.36.1.el7   kernel-uek.x86_64 0:3.8.13-118.11.2.el7uek   kernel-uek-firmware.noarch 0:3.8.13-118.11.2.el7uek

  NetworkManager.x86_64 1:1.0.6-31.0.1.el7_2                            NetworkManager-config-server.x86_64 1:1.0.6-31.0.1.el7_2
  NetworkManager-libnm.x86_64 1:1.0.6-31.0.1.el7_2                      NetworkManager-team.x86_64 1:1.0.6-31.0.1.el7_2
  NetworkManager-tui.x86_64 1:1.0.6-31.0.1.el7_2                        dnsmasq.x86_64 0:2.66-14.el7_2.1
  java-1.8.0-openjdk-headless.x86_64 1:            kernel-tools.x86_64 0:3.10.0-327.36.1.el7
  kernel-tools-libs.x86_64 0:3.10.0-327.36.1.el7                        kmod.x86_64 0:20-8.el7_2
  kmod-libs.x86_64 0:20-8.el7_2                                         kpartx.x86_64 0:0.4.9-85.el7_2.6
  libgudev1.x86_64 0:219-19.0.2.el7_2.13                                libteam.x86_64 0:1.17-7.el7_2
  openssl.x86_64 1:1.0.1e-51.el7_2.7                                    openssl-libs.x86_64 1:1.0.1e-51.el7_2.7
  pgdg-oraclelinux95.noarch 0:9.5-3                                     postgresql95.x86_64 0:9.5.4-2PGDG.rhel7
  postgresql95-contrib.x86_64 0:9.5.4-2PGDG.rhel7                       postgresql95-libs.x86_64 0:9.5.4-2PGDG.rhel7
  postgresql95-server.x86_64 0:9.5.4-2PGDG.rhel7                        puppet-agent.x86_64 0:1.7.0-1.el7
  puppetlabs-release-pc1.noarch 0:1.1.0-2.el7                           puppetserver.noarch 0:2.6.0-1.el7
  python.x86_64 0:2.7.5-39.0.1.el7_2                                    python-libs.x86_64 0:2.7.5-39.0.1.el7_2
  python-perf.x86_64 0:3.10.0-327.36.1.el7                              selinux-policy.noarch 0:3.13.1-60.0.1.el7_2.9
  selinux-policy-targeted.noarch 0:3.13.1-60.0.1.el7_2.9                systemd.x86_64 0:219-19.0.2.el7_2.13
  systemd-libs.x86_64 0:219-19.0.2.el7_2.13                             systemd-sysv.x86_64 0:219-19.0.2.el7_2.13
  teamd.x86_64 0:1.17-7.el7_2                                           tuned.noarch 0:2.5.1-4.el7_2.6

Complete!    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *