kidd / org-gcal.el

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

Replacing plstore prompt with password-store #225

Open d-miketa opened 1 year ago

d-miketa commented 1 year ago

Hi and thanks for this plugin!

I was wondering if it's possible to integrate the plstore mechanism with a password manager. I already use password-store for my Calendar secret and have to input a password once already to recover it for org-gcal. It's annoying to have to do it again for another prompt immediately following this one. A better behaviour would be to specify a function outputting the plstore password. It'd also be great to be able to specify a function for the org-gcal secret.

podiki commented 1 year ago

Yes, can't we plug into the options emacs has for storing secrets (e.g. authinfo, gpg)? I was very confused by the plstore pop up and still trying to figure out why it doesn't actually save...

EDIT: on that last point, discussed here https://github.com/kidd/org-gcal.el/issues/213 (for me creating the plist file helped)

megodoonch commented 1 year ago

I don't know if this is related, but I have either a new or newly-noticed error on sync: org-gcal-sync-buffer: error: (no-catch block nil)

Here is my org-gcal related .emacs bit:

(setq org-gcal-client-id "[redacted]apps.googleusercontent.com"
       org-gcal-client-secret "[redacted]"
       org-gcal-fetch-file-alist '(("[redacted]" .  "~/Sync/google.org") 
                   ("[redacted]@import.calendar.google.com" . "~/Sync/uu.org")
                   ([redacted]@group.calendar.google.com" . "~/Sync/tasks.org")
                                   ))

(require 'org-gcal)
(setq epg-pinentry-mode 'loopback)
(setenv "GPG_AGENT_INFO")
(setq-default plstore-cache-passphrase-for-symmetric-encryption t)
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

eval-on-point commented 9 months ago

I am attempting this and see a small error in the README:

    (require 'plstore)
    (add-to-list 'plstore-encrypt-to '("KEY ID"))

produces an error because plstore-encrypt-to expects to be a list of strings

qichanghai commented 8 months ago

I am attempting this and see a small error in the README:

    (require 'plstore)
    (add-to-list 'plstore-encrypt-to '("KEY ID"))

produces an error because plstore-encrypt-to expects to be a list of strings

Thanks @eval-on-point. This helped me solve my authentication problem. I use the following:

    (add-to-list 'plstore-encrypt-to "GPG KEY ID")