How to add a GPG key to RPM

I always forget the syntax for retrieving GPG keys from a key server, e.g. to add them to RPM. Here the reminder:

gpg --keyserver pgp.mit.edu --recv-key 0xde95bc1f
gpg -a --export 0xde95bc1f > key.gpg
rpm --import key.gpg
rm key.gpg

P.S. the example key is used to sign Libvirt RPM's for Fedora

Syndicate content