Monday, April 13, 2015

Fun with GPG


I once had a desire to create a team GPG key that I could use for signing RPMs. I've moved in a different direction, but I want to capture the steps in case I decide to use this again in the future.

You can import a private GPG with the following:

gpg --allow-secret-key-import --import private.key.file
gpg --list-keys
gpg --edit-key <ID> 

Once you run --edit-key you're able to trust the key. Execute **trust** and choose level **5**

With that done, you can decrypt using the key - assuming you know the password.

gpg -d -u "name <email>" encrypted.file.gpg > outputfile


To encrypt for the team key to unlock:

gpg -se -r "name <email>" -u "name <email>" encrypted.file

No comments: