GPG & No Usable Config
I’ve been using GPG without any dotemacs configuration & without issue or concern on Win10 machines for a long time but recently i started to recieve “no usable configuration errors” now i know its not because i’ve made changes to the dotemacs file, altered key etc but on checking log files i have updated to version 3.1.15 of Gpg4win as well as switched emacs to 28.0.50 from 27.1 but that change hasnt created the issue (switch back and it still fails) so it looks like the Gpg4win upgrade has altered something on two separate systems with identical results. To get it working again i’ve had to modify the dotemacs in a similar fashion to how i run emacs on a locked machine which software installs are not allowed and that is by specifying directly the home and program directories;
emacs-lisp code snippet start
;(customize-set-variable epg-debug t)
(customize-set-variable 'epg-gpg-home-directory "C:/Users/lhall/AppData/Roaming/gnupg/")
(customize-set-variable 'epg-gpg-program "D:/Software/GnuPG/bin/gpg.exe")
(customize-set-variable 'epg-gpgconf-program "D:/Software/GnuPG/bin/gpgconf")
(customize-set-variable 'epg-gpgsm-program "D:/Software/GnuPG/bin/gpgsm")
emacs-lisp code snippet end
Once the above is done i can now once again en/de-crpyt my data. However i did notice two things;
First: making a change to my dotemacs file under 28.0.50 means it fails to compile when re-opening emacs unless i start 27.1 first and then the snapshot emacs runs fine afterwards and on one machine that running ox-hugo export fails with Error: (file-missing "Searching for program" "No such file or directory" "git")
¯\(°_o)/¯ I had been considering a switch at home to WSL which seems to work well which allows the use of mu4e maybe this is the push needed? but as orgmode itself is such a fantastic tool for project & information management that it is emacs for me - it is often the sole purpose of running emacs perhaps some none unix focus would grow its audience?
Secondly: whilst googling the problem i came across several sites complaining that pgp should be shot and from that there is a new apparently easier, less problematic modern alternative to GPG called age that in its own words features small explicit keys, no config options, and UNIX-style composability. It is written in GO and on trying it out seems very quick & simple. Now all thats needed is an emacs interface. Example from age site
bash code snippet start
$ age-keygen -o key.txt
Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
$ tar cvz ~/data | age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p > data.tar.gz.age
$ age --decrypt -i key.txt data.tar.gz.age > data.tar.gz
bash code snippet end