It's possible to create multi-line entries in `pass(1)` where additional
lines have further metadata, e.g.
$ pass show kit-access
<secret pw>
user: uXXXX
which can be helpful to persist e.g. the corresponding username.
However it's a convention that the password is only in the first line,
e.g. `pass show -c` (which is used by `passmenu` to copy a secret into
the clipboard) only the first line is used by default.
I switched to such an approach recently and realized that this is now a
problem because `KIT-ILIAS-Downloader` passes the entire string to the
SAML login, so I decided to just strip everything after the first line
in the output of `pass show`.
We may want to implement support for extracting usernames from such a
format in the future, but... that's an exercise left for the reader ;-)
`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/