diff --git a/GnuPG-Things.md b/GnuPG-Things.md new file mode 100644 index 0000000..d83905b --- /dev/null +++ b/GnuPG-Things.md @@ -0,0 +1,37 @@ +Allow unattended passphrases to work, stop a GUI dialog when using a CLI app: + +``` +$ cat ~/.gnupg/gpg-agent.conf + +pinentry-program /usr/bin/pinentry-tty +allow-loopback-pinentry +``` + +Reload the agent running in the background to update the above, as well as to force it to forget passphrases being cached in memory: + +``` +gpg-connect-agent reloadagent /bye +``` + +Encrypt and decrypt a file then test they match, order matters of CLI flags for decrypting. + +``` +gpg -c passwords_backup.csv +gpg -o passwords_restored.csv -d passwords_backup.csv.gpg +diff -uN passwords_backup.csv passwords_restored.csv +``` + +Use a keyserver with Let's Encrypt wrapped around it +``` +$ cat ~/.gnupg/dirmngr.conf + +hkp-cacert /home/FOO/.gnupg/le.pem +keyserver hkps://keys.openpgp.org +``` + +Set a default key to use +``` +$ cat ~/.gnupg/gpg.conf + +default-key ABCD1234 +```