FliegendeWurst / KIT-ILIAS-downloader

Downloader for https://ilias.studium.kit.edu/
GNU General Public License v3.0
42 stars 9 forks source link

cli: Support for `pass(1)` as credential storage #33

Closed Ma27 closed 2 years ago

Ma27 commented 2 years ago

pass(1)[1] is a small CLI-based password manager. When passing --pass-path edu/kit/uXXXX to KIT-ILIAS-Downloader, it now attempts to retrieve the password from pass(1).

It is assumed that pass(1) is available in the $PATH of the process. If that's not the case, it errors out with an error like this:

Error: credentials input failed

Caused by:
    pass not found in $PATH!

It's also taken care of the case where the value --pass-path is not present in the store, the error will look like this:

Error: credentials input failed

Caused by:
    `pass` failed with non-zero exit code 1: Error: edu/kit/uXXXX is not in the password store.

Closes #32

[1] https://www.passwordstore.org/