How to make pass read input from Bash ENV variable?

Valera Rozuvan 2c7v7czk85j3 at protonmail.com
Thu Apr 1 17:54:56 UTC 2021


Hi!

I am struggling to find a way to save/edit a password with `pass` that is stored in an ENV variable. I am also not finding an option in `pass` man page on how to do this. What comes to my mind is something like this:

$ PASS="1234567890"
$ echo $PASS | pass insert my_pass

But after running the above 2 commands, I get an error when I try to retrieve the password:

$ pass my_pass
Error: my_pass is not in the password store.

----------

Is there a way to do this? Or maybe the only way is to hack on `pass` and add a command line option to make it read from a Linux pipe?

Regards,
Valera Rozuvan


More information about the Password-Store mailing list