Skip to content

Commit

Permalink
docs: add instructions to get pw from environment variable
Browse files Browse the repository at this point in the history
tested with vdirsyncer 0.19.2 on archlinux
  • Loading branch information
azrdev authored and WhyNotHugo committed Nov 26, 2023
1 parent 82fd03b commit d1f93ea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/keyring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,19 @@ You can also simply prompt for the password::
type = "caldav"
username = "myusername"
password.fetch = ["prompt", "Password for CalDAV"]

Environment variable
===============

To read the password from an environment variable::

[storage foo]
type = "caldav"
username = "myusername"
password.fetch = ["command", "printenv", "DAV_PW"]

This is especially handy if you use the same password multiple times
(say, for a CardDAV and a CalDAV storage).
On bash, you can read and export the password without printing::

read -s DAV_PW "DAV Password: " && export DAV_PW

0 comments on commit d1f93ea

Please sign in to comment.