Wednesday, 24 June 2009

apt gpg Key Problem

I run a few Debian machines and I use aptitude on all of them to keep the packages up to date. Recently on one machine only I've been getting gpg key errors. In fact it is the server that I have with Rimu Hosting (great guys) that suddenly started presenting the error:
W: GPG error: stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B W: There is no public key available for the following key IDs: 9AA38DCD55BE302B
To list the keys that I know about I run 'apt-key list':
/etc/apt/trusted.gpg -------------------- pub 1024D/2D230C5F 2006-01-03 [expired: 2007-02-07] uid Debian Archive Automatic Signing Key (2006) pub 1024D/6070D3A1 2006-11-20 [expires: 2009-07-01] uid Debian Archive Automatic Signing Key (4.0/etch) pub 1024D/ADB11277 2006-09-17 uid Etch Stable Release Key pub 1024D/BBE55AB3 2007-03-31 [expires: 2010-03-30] uid Debian-Volatile Archive Automatic Signing Key (4.0/etch) sub 2048g/36CA98F3 2007-03-31 [expires: 2010-03-30]
Like the program says, I'm missing a key. I tried the keyserver to import the key: sudo gpg --keyserver --recv-key 55BE302B ...and then export that key into apt's key list: sudo gpg -a --export 55BE302B | sudo apt-key add - That done, I run aptitude and I can now happily install my security updates.