File encryption with GnuPG

Encrypt file:

gpg -c private.txt

You will be prompted to enter a passphrase twice. The output is a file of the same name with ".gpg" as the extension.

Decrypt via:

gpg private.txt.gpg

By default the encrypted file is binary format with smaller file size. If you need ascii, then use the "-a" option which then outputs as "private.txt.asc".

removing rpm imported gpg-key

While install the puppet dashboard, I noticed puppetlabs yum repo changed from using "" to "" causing yum to fail on the key import. I had run the key import manually couple times before I realized, yum was complaining about a different key.

Below is how I got around to removing all of the imported gpgkeys:

Find GPG keys and owners:

rpm -qa gpg-pubkey\* --qf "%{version}-%{release} %{summary}\n"

Remove corresponding GPG Key.

rpm -e gpg-pubkey-8347a27f-4afe0f12 --allmatches

Syndicate content