Rpm listgpgkeys

From Asenjo
Revision as of 21:12, 28 August 2015 by Natxo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

List installed gpg keys in rpm database

# rpm -q gpg-pubkey --qf "%{summary}\n"
gpg(CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>)
gpg(Dag Wieers (Dag Apt Repository v1.0) <dag@wieers.com>)

So we can check if a key is (or not) installed (by cfengine) and eventually import the key automatically.

rpm -qa gpg-pubkey*

Details about a specific public key, when imported, can be displayed by querying.
rpm -qi gpg-pubkey-db42a60e

Finally, public keys can be erased after importing just like packages. Here’s how  to  remove  the Red Hat GPG/DSA key

rpm -e gpg-pubkey-db42a60e
$ <span class="cli-demo-input">yum install 389-ds-base dogtag-pki</span>
yum install 389-ds-base dogtag-pki
Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit
Resolving Dependencies
...

Complete!
$