Having problems updating because you’re missing authentication keys on Debian? I “cracked my head” over this because I couldn’t find unbroken clear step by step instructions on the net, or even on the mailing lists. Read the following account on how I encountered this problem and solved it, or just skip ahead to the solution.
The following error was encountered when attempting # apt-get update:
Reading package lists… Done
W: GPG error: http://gulus.usherbrooke.ca testing Release: The following
signatures couldn’t be verified because the public key is not available:
W: GPG error: http://debian.yorku.ca testing Release: The following
couldn’t be verified because the public key is not available: NO_PUBKEY
W: You may want to run apt-get update to correct these problems
USER@SYSTEM:~$ cat updateProblems
The following error was encountered when attempting # apt-get update.
No amount of # apt-get update fixed the solution until …
First of all you can see keys & check their exp. dates with:
|$ apt-key list|
You can get keys using the following syntax:
- Get key ziyi_key_2006.asc from http://ftp-master.debian.org/ and download to /home. (I did this with Firefox but in /home you can pass:
$ wget http://ftp-master.debian.org/ziyi_key_2006.asc
- Then import the key:
$ gpg –import ziyi_key_2006.asc
- Get the key id from the above command (ie., XXXXXXXX) and pass the following:
$ gpg –fingerprint XXXXXXXX
- Have apt accept the key (I did this as # and as a piped command but some suggest only the latter command should be done as #, so you might want to perform them separately):
# gpg –armor –export XXXXXXXX | apt-key add –
For security purposes, you can split the last (composite) command into two and only perform the newly formed last command as root.
Get keys from:
Use of secure apt with testing was first commented at:
but the instructions seem broken with the 2006 key (It’s Jan. 2006 as I
*Don’t forget to enable testing security as per (not default):
*Debian is inconsistent on the key naming convention and install procedure (various working models break). Anyway, I’ve found various guides including the following,
- # wget http://ftp-master.debian.org/archive-key-4.0.asc -O – | apt-get add –
but –as noted on at least one mailing list– it doesn’t work.
UPDATE: Sept. 20, 2007
Last time I had missing or outdated key problems, the above did not work. Apparently the original above method is deprecated. As far as I recall, I first listed all keys, then identified the expired ones, finishing up with their deletion.
- apt-key list
- apt-key del xxxxx
(Repeat the above for every expired key.) I then performed,
- apt-key update
- apt-get update
Others have had to also do the following, with the first line being optional,
- dpkg –purge debian-archive-keyring
- apt-get install debian-archive-keyring
- apt-get update
Still others reported having to pass something like,
- apt-key add /usr/share/keyrings/debian-role-keys.gpg
after installing the debian-archive-keyring (<http://www.mepis.org/node/1547>).
This is licensed under the Attribution-NonCommercial-ShareAlike 3.0 Unported Creative Commons License. All brands mentioned are properties of their respective owners. By reading this article, the reader forgoes any accountability of the writer. The reading of this article implies acceptance of the above stipulations. The author requires attribution –by full name and URL– and notification of republications.
This article may be outdated and of historical value.