Difference between revisions of "Rpm listgpgkeys"

From Asenjo
Jump to: navigation, search
Line 10: Line 10:
  
 
So we can check if a key is (or not) installed (by cfengine) and eventually import the key automatically.
 
So we can check if a key is (or not) installed (by cfengine) and eventually import the key automatically.
 +
 +
<code><pre>
 +
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
 +
</pre></code>

Revision as of 22:26, 19 September 2014


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