apt升级无法找到public key的两种解决方法

Every debian source has a public key, which can be used to
make sure that the source is safe and
encrypt the communications between client and server.
Notice: Your client must have the same public key.

So if you add a new source in /etc/apt/sources.list,
when you apt-get update you will often get the warings:

W: GPG error: http://mirror.debian.cn etch Release: The following
signatures couldn't be verified because the public key is not available:
NO_PUBKEY 9AA38DCD55BE302B

Now, let's solve it:

Method 1: you can get from others who can update without the warnings, but
make sure you have the same source.

In the normal computer:
$ apt-key export 55BE302B > /tmp/key

In my computer:
$ sudo apt-key add /tmp/key

Method 2: you can get the public key from wwwkeys.pgp.net
$gpg --keyserver wwwkeys.pgp.net --recv-keys 55BE302B

$gpg --export -a 55BE302B | apt-key add -

你可能感兴趣的:(public)