org-caldav icon indicating copy to clipboard operation
org-caldav copied to clipboard

Can't use authinfo on windows

Open proudot opened this issue 3 years ago • 3 comments

Hi and thx a lot for the great mode! I am having trouble with authinfo. Org-caldav keeps asking me for my credential. Here is my config below. I can retrieve it with (auth-source-search ...). Any ideas ?

machine dav.fruux.com:433 port https login USERNAME password PWD

proudot avatar Feb 08 '22 16:02 proudot

Same issue here. I tried many things for machine, like same as org-caldav-url or part of it, but none succeeded.

I digged into org-caldav code, but so far, I could not find with which string org-caldav tries to retrieve the auth info.

Perhaps enabling debug, but where ?

deb75 avatar Mar 08 '22 12:03 deb75

Got it !

I use org-caldav with davmail.

I configured this latest to listen on localhost at port 1080 without ssl.

The org-caldav relevant configuration is :

(setq org-caldav-url "http://localhost:1080/users"
      org-caldav-inbox "/path/to/org/agenda/file/where/org-caldav/write/events/outlook.org"
      org-caldav-calendar-id "[email protected]/calendar")

Then, in .authinfo.gpg file, add the following :

machine localhost:1080 login mylogin password mypassword

and never again will you be asked your credentials (apart decrypting the authinfo file).

Regards

deb75 avatar Mar 08 '22 13:03 deb75

I think the issues is that the username and the user path isn't the same but the package assumes this. The solution would be to resolve the username the path for the username.

Other clients such as Kontact or Sailfish OS do it like this.

E.g. change org-caldav-url to point to the caldav server. Add org-caldav-user property that is then resolved to the path of the user like (setq org-caldav-calendar (org-caldav--resolve-path calendar)).

After this is done configuring calendars should be easier and credentials can be resolved by the real user name and not just by the internal id.

Thaodan avatar Oct 19 '22 00:10 Thaodan