Add 'GnuPG Things'

tengel 2024-03-20 11:55:03 -05:00
parent 45d131a35f
commit 4835b2a6f4

37
GnuPG-Things.md Normal file

@ -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
```