I have an
accounts.org.gpg file. I can open it using gpg directly:
$ gpg -d ./accounts.org.gpg You need a passphrase to unlock the secret key for user: "Omair Majid <removed@removed>" 4096-bit RSA key, ID 7CC8AAC6, created 2012-01-18 (main key ID 66484681) gpg: encrypted with 4096-bit RSA key, ID 7CC8AAC6, created 2012-01-18 "Omair Majid <removed@removed>" +TITLE: Accounts <rest of output removed>
But I can't open the same file using Emacs. Trying to open it in emacs gives me an error:
epa-file--find-file-not-found-function: Opening input file: Decryption failed, No secret key: E295ECEC7CC8AAC6
Is there something I need to configure on the emacs side to make this work?
For some additional background, I created this file on another machine
(using the same version of Emacs), on which Emacs could read/write to
that file just fine. I then copied over the contents of
over to this machine. And now gpg can still read it, but Emacs can't.
EDIT: Could this be a gpg1 vs gpg2 difference?
$ gpg2 --decrypt accounts.org.gpg gpg: encrypted with RSA key, ID E295ECEC7CC8AAC6 gpg: decryption failed: No secret key
How was the Emacs on the other machine (using same configuration, same version of Emacs (25.1) and same OS (Fedora 24 x86_64, same version of gpg and gpg2 packages)) read from it and write to it. Anyway using,
(setq epg-gpg-program "/usr/bin/gpg")
Still results in the same error.