kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
432 stars 47 forks source link

Error on Sync: deferred error : (epg-error "Decryption failed" "") #231

Open paraschivescu opened 1 year ago

paraschivescu commented 1 year ago

Hi all,

My apologies as I'm just a user, not a developer, so I might be doing something wrong, but I spent hours trying to figure this out to no avail.

When I run org-gcal-sync, it asks for a passphrase and I provide the API key from the Google dev console. Then I get the error mentioned in the subject line:

Finding :entry-id: locations (1/11 files): c:/Dropbox/Notes/projects.org
11 files scanned, and 1 :entry-id: IDs found.
Decrypting c:/Dropbox/Home/.emacs.d/oauth2-auto.plist...done
deferred error : (epg-error "Decryption failed" "")

I'm on Windows 10 and Emacs 27.1. Here is the setup in my .emacs file:

(setenv "GPG_AGENT_INFO" nil) (require 'epa-file) (require 'password-cache) (setq password-cache-expiry (* 15 60)) (setq epa-file-cache-passphrase-for-symmetric-encryption t) (setq plstore-cache-passphrase-for-symmetric-encryption t) (setq epa-pinentry-mode 'loopback) ;; get emacs to use the minibuffer to enter passwords (setq org-gcal-client-id "" org-gcal-client-secret "" org-gcal-file-alist '(("" . "~/../Notes/gcal.org")))

Any ideas what might be wrong?

telotortium commented 1 year ago

I recently discovered that plstore can use asymmetric GPG keys from gpg-agent and wrote some instructions on how to use it. It at least doesn't prompt me for passwords so much. Try setting this up and see if it works? https://github.com/kidd/org-gcal.el/pull/239