hacker emblem

GPG Schlüsselverwaltung für apt-get

apt-get in Debian sid (d.h. der "unstable"-Version) unterstützt jetzt seit einiger Zeit signierte Release-Files, siehe auch das entsprechende Kapitel im "Securing Debian HowTo".

Da im Moment der aktuelle Schlüssel des Debian Archivs noch nicht automatisch vorhanden ist, kommt es bei einem "apt-get update" im Moment zu folgender Fehlermeldung:

W: GPG error: ftp://ftp.at.debian.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F

Ausserdem wird bei der Installation von Paketen folgende zusätzliche Abfrage gemacht:

WARNING: The following packages cannot be authenticated!
...
Install these packages without verification [y/N]?

Im folgenden kurz die Schritte um den aktuellen Archiv-Key zu installieren:

Variante 1: regulärer Download

Zuerst den Schlüssel von http://www.debian.org/releases/ (ganz unten, der Link namens ziyi_key_2006) bzw. http://ftp-master.debian.org/ herunterladen , danach den Schlüssel mit

root@home# apt-key add /path/to/ziyi_key_2006.asc
gpg: no ultimately trusted keys found
OK

der apt-get Schlüssel-Datenbank hinzufügen.

Variante 2: Download via Keyserver

Zuerst den Schlüssel mit gpg herunterladen: (die Schlüssel-ID stand ja in der apt-get Fehlermeldung, siehe oben)

root@home# gpg --recv-keys 010908312D230C5F
gpg: requesting key 2D230C5F from hkp server subkeys.pgp.net
gpg: key 2D230C5F: public key "Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1

(falls kein Keyserver konfiguriert ist, in ~/.gnupg/gpg.conf z.B.

keyserver hkp://subkeys.pgp.net

eintragen)

Danach den Schlüssel der apt-get Datenbank hinzufügen:

root@home# gpg --export 010908312D230C5F | apt-key add -
gpg: no ultimately trusted keys found
OK

Sonstiges

Analog kann man natürlich auch andere Schlüssel für 3rd-party apt-Quellen (wie z.B. das Repository von Christian Marillat) hinzufügen. Die installierten Schlüssel kann man sich mit

root@home# apt-key list
/etc/apt/trusted.gpg
--------------------
pub 1024R/1DB114E0 2004-01-15 [expired: 2005-01-27]
uid Debian Archive Automatic Signing Key (2004) <ftpmaster@debian.org>

pub 1024D/4F368D5D 2005-01-31 [expires: 2006-01-31]
uid Debian Archive Automatic Signing Key (2005) <ftpmaster@debian.org>

pub 1024D/2D230C5F 2006-01-03 [expires: 2007-02-07]
uid Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>

pub 1024D/1F41B907 1999-10-03
uid Christian Marillat <marillat@debian.org>
uid Christian Marillat <marillat@free.fr>
sub 1536g/C28DCC42 1999-10-03
sub 1024D/5D3877A7 2002-08-26

anzeigen lassen, alte (abgelaufene) Schlüssel kann man mit

root@home# apt-key del 1DB114E0
OK

löschen.

read more | admin's blog | 2 comments

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
The content of this field is kept private and will not be shown publicly.
  • Textual smileys will be replaced with graphical ones.
  • Lines and paragraphs break automatically.
More information about formatting options