GNUPG Auto Keyserver Retrieve Trick of the Day


Found this the other day, but forgot to post. For those of you who use GNUPG (GPG) you know how it’s a bit of a pain in the ass to go and download someone’s public key? Put the following code in your $HOME/.gnupg/options file:



keyserver wwwkeys.us.pgp.net

keyserver-options “auto-key-retrieve”



The keyserver can be whatever one you choose, but the second line will get gnupg to automatically retrieve keys as needed when verifying signatures or importing keys. Niftyness.



Of course you should always follow good practices and verify someone’s public key properly (ie: call them on the phone, talk to them in person) before giving that key ultimate trust.