3

Below is debugger results. epa does work fwiw.

Debugger entered--Lisp error: (error "Encrypt failed")
  signal(error ("Encrypt failed"))
  error("Encrypt failed")
  org-encrypt-entry()
  funcall-interactively(org-encrypt-entry)
  call-interactively(org-encrypt-entry record nil)
  command-execute(org-encrypt-entry record)
  helm-M-x(nil #("org-encrypt-entry" 0 17 (match-part "org-encrypt-entry")))
  funcall-interactively(helm-M-x nil #("org-encrypt-entry" 0 17 (match-part "org-encrypt-entry")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)
vv111y
  • 53
  • 5

1 Answers1

3

I had the same problem -- for me the private key set up for the encryption was expired.

# First try whether you can encrpyt anything from the command line
touch /tmp/test.txt
gpg --encrypt --recipient "your_mailaddress@example.org" /tmp/test.txt

This failed for me with /tmp/test.txt: encryption failed: No public key (which I found slightly misleading). But gpg --list-keys showed me that my key was indeed expired. So I changed the expire-date to be in one year:

gpg --quick-set-expire "your_mailaddress@example.org" 1y

Now gpg --encrypt --recipient "your_mailaddress@example.org" /tmp/test.txt worked as well as the org-encrypt-entry. Maybe that is your problem as well?

ricma
  • 146
  • 3
  • Worked! I had to do even more configuration to get it all going, including installing pinentry-mac (via brew) for decryption. Thanks @ricma – vv111y Oct 02 '18 at 12:31