Debian: registering an apt repository key

See also:

Here is an useful script to register APT keys, to avoid the “There are no public key available for the following key IDs” warning message.


# samu 2010-01-01
# (c) 2010 Samuele ~redShadow~ Santi
# redshadow& -
# Under Gnu GPL v3


echo "Registering APT key $1..."
gpg --keyserver --recv-keys "$KEYID"
gpg --export --armor "$KEYID" | apt-key add -

Alternative: debian-archive-keyring


apt-get install debian-archive-keyring

or, if you have unstable repositories:

apt-get install debian-archive-keyring/unstable

apt-key update

Another method, is just to run:

apt-key update

“This will obtain the necessary keys and import them. No need to go through gpg directly”.

Anyways, this method will not always work.

comments powered by Disqus

Table Of Contents

Previous topic

Debian: regenerate SSH keys

Next topic

Using Git via SSH and a non-standard user

This Page