23

I have just stared to receive some strange errors regarding GPG keys. Namely I have just added ppa:ubuntu-toolchain-r/test and wanted to update and after that I got this:

W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://qgis.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 030561BEDD45F6C3
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

I have tried to resolved it in 2 ways (provided here)

for key in 40976EAF437D05B5 3B4FE6ACC0B21F32 A040830F7FAC5991 030561BEDD45F6C3 16126D3A3E5C1192  ; do sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key ; done

but that didn't help (the same errors kept coming with the same keys) so I have tried to do this :

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

but I got this which opened my eyes:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  launchpad-getkeys libvte-common libvte9 python-keyring python-launchpadlib
  python-lazr.restfulclient python-lazr.uri python-oauth python-secretstorage
  python-simplejson python-vte python-wadllib xclip yad
Suggested packages:
  python-gdata python-keyczar python-kde4 python-testresources
  python-secretstorage-doc
The following NEW packages will be installed:
  launchpad-getkeys libvte-common libvte9 python-keyring python-launchpadlib
  python-lazr.restfulclient python-lazr.uri python-oauth python-secretstorage
  python-simplejson python-vte python-wadllib xclip y-ppa-manager yad
0 upgraded, 15 newly installed, 0 to remove and 29 not upgraded.
Need to get 915 kB of archives.
After this operation, 4,515 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  libvte-common libvte9 python-keyring python-lazr.uri python-simplejson
  python-wadllib python-oauth python-lazr.restfulclient python-launchpadlib
  python-secretstorage python-vte xclip
Install these packages without verification? [y/N]

closed as off-topic by Panther, Eric Carvalho, Eliah Kagan, karel, Braiam Sep 8 '14 at 22:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Panther, Eric Carvalho, Braiam
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    try sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY> . For example sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 – g_p Sep 6 '14 at 13:50
  • I tried and this didn't work at that point. Check my answer. – Patryk Sep 6 '14 at 13:51
  • 2
    This is essentially a bug report where you describe a problem and as an answer you refer to the bug report. The bug report itself is for 13.10 which is beyond end of life. If you are on 13.10 I suggest you upgrade. If you are on a current version of Ubuntu I suggest you file a new bug report as the old one is out dated. reference the old one in the new. – Panther Sep 6 '14 at 13:57
  • possible duplicate of How do I fix the GPG error "NO_PUBKEY"? – Eliah Kagan Sep 6 '14 at 23:57
58

Run command:

sudo apt-get update

For every 16-character key that is reported as missing, run the following with the key substituted:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABCDEFGH12345678
  • 2
    I get the following errors: gpgkeys: key 1DB8ADC1CFCA9579 can't be retrieved. gpg: no valid OpenPGP data found. What can I do? – becko Jan 5 '15 at 15:10
  • 3
    what if there were no missing keys reported on apt-get update? – harayz Mar 25 '15 at 9:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.