Due to this error, I can’t upgrade my Debian virtual machine :

root@puppetagent:~# apt-get update
---
---
---
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.puppetlabs.com jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7F438280EF8D349F

W: Failed to fetch http://apt.puppetlabs.com/dists/jessie/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.

PuppetLabs has decided to change the GPG key ID, so I need to activate a new one …

Import the GPG key :

root@puppetagent:~# gpg --keyserver pgp.mit.edu --recv-key 7F438280EF8D349F
gpg: requesting key EF8D349F from hkp server pgp.mit.edu
gpg: key EF8D349F: public key "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Check the fingerprint :

root@puppetagent:~# gpg --keyserver pgp.mit.edu --recv-key 7F438280EF8D349F
gpg: requesting key EF8D349F from hkp server pgp.mit.edu
gpg: key EF8D349F: public key "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

OK, we can use it :

root@puppetagent:~# gpg -a --export EF8D349F | apt-key add -
OK

Display the Puppet GPG keys :

root@puppetagent:~# apt-key list | grep -i -B 3 puppet
/etc/apt/trusted.gpg
--------------------
pub   4096R/EF8D349F 2016-08-18 [expires: 2021-08-17]
uid                  Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>
--
pub   4096R/65FFB764 2012-05-08 [expires: 2019-05-07]
uid                  Wheezy Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/puppetlabs-pc1-keyring.gpg
-------------------------------------------------
pub   4096R/4BD6EC30 2010-07-10 [expires: 2017-01-05]
uid                  Puppet Labs Release Key (Puppet Labs Release Key) <info@puppetlabs.com>

It sounds good,

root@puppetagent:~# apt-get update
Ign http://mirror.switch.ch jessie InRelease
Ign http://apt.puppetlabs.com jessie InRelease
Get:1 http://mirror.switch.ch jessie-updates InRelease [142 kB]
Get:2 http://apt.puppetlabs.com jessie Release.gpg [836 B]
Get:3 http://apt.puppetlabs.com jessie Release [40.6 kB]
Hit http://mirror.switch.ch jessie Release.gpg
Hit http://mirror.switch.ch jessie Release
Get:4 http://mirror.switch.ch jessie-updates/main Sources [15.5 kB]
Get:5 http://mirror.switch.ch jessie-updates/main amd64 Packages/DiffIndex [5440 B]
Get:6 http://mirror.switch.ch jessie-updates/main Translation-en/DiffIndex [2704 B]
Hit http://security.debian.org jessie/updates InRelease
Get:7 http://apt.puppetlabs.com jessie/PC1 amd64 Packages [12.0 kB]
Hit http://mirror.switch.ch jessie/main Sources
Hit http://mirror.switch.ch jessie/main amd64 Packages
Hit http://mirror.switch.ch jessie/main Translation-en
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://security.debian.org jessie/updates/main Translation-en
Ign http://apt.puppetlabs.com jessie/PC1 Translation-en
Fetched 220 kB in 3s (65.3 kB/s)
Reading package lists... Done

Now, we can upgrade all packages :

root@puppetagent:~# apt-get dist-upgrade

And what’s about Puppet ?

root@puppetagent:~# puppet --version
4.7.0

Puppet has been upgraded …

 

PDF24    Send article as PDF   

2 thoughts on “Puppet : apt-update error : the public key is not available: NO_PUBKEY 7F438280EF8D349F

Leave a Reply

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


*