Aug 232012
 

昨晚下载puppet的apt源,这样日后可以很方便在内部测试puppet,不过发现一个问题,当客户端更新的时候,会遇到

W: GPG error: http://10.1.199.11 precise Release: 
The following signatures couldn't be verified because the public key is not available: 
NO_PUBKEY 1054B7A24BD6EC30

查了一下,这个错误比较普遍,只要你用手工的方式添加额外的源,基本都会碰到这个问题。

root@node18:~# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub   2048g/79164387 2004-09-12

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>

如果你添加的源是没有信任的key,就无法安装。

知道原因就好办了。

需要注意的是:gpg: key 4BD6EC30,这也就是下面运行export 的数字。你如果不是puppet,你就需要根据你gpg的key来调整。

# wget http://apt.puppetlabs.com/pubkey.gpg

# gpg --import pubkey.gpg gpg: directory `/root/.gnupg' created gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/root/.gnupg/secring.gpg' created gpg: keyring `/root/.gnupg/pubring.gpg' created gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key 4BD6EC30: public key "Puppet Labs Release Key (Puppet Labs Release Key) <info@puppetlabs.com>" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) gpg: no ultimately trusted keys found

 

# gpg -a --export 4BD6EC30 | apt-key add - OK

 

# apt-key list /etc/apt/trusted.gpg -------------------- pub 1024D/437D05B5 2004-09-12 uid Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com> sub 2048g/79164387 2004-09-12 pub 1024D/FBB75451 2004-12-30 uid Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com> pub 4096R/4BD6EC30 2010-07-10 [expires: 2016-07-08] uid Puppet Labs Release Key (Puppet Labs Release Key) <info@puppetlabs.com>

 Leave a Reply

(required)

(required)