4 ms·
I just use pass[0] from the command line. pass show whatever-key | password-hungry-command - [0] - https://www.passwordstore.org/ https://www.passwordstore.or
by tolmannator 9y ago
I just use pass[0] from the command line.
pass show whatever-key | password-hungry-command -
[0] - https://www.passwordstore.org/ https://www.passwordstore.org/
- dharmab 9y agoI use pass in combination with direnv[0] to load secrets into project directories as environment variables. [0] - https://direnv.net https://direnv.net
- tolmannator 9y agoI use a shell.nix[0] file for this. That way I can install dependencies and all that too as well as vars and aliases. [0] - https://nixos.org/nix/manual/#sec-nix-shell https://nixos.org/nix/manual/#sec-nix-shell
- craftyguy 9y agoI use pass too, but technically you just need gpg to do this exact same thing. pass, in this use case, is literally just a very thin wrapper to gpg + a file with your password in it.
- tolmannator 9y agoI understand, but personally, if I'm already using the convenient wrapper that is pass for everything else, it simplifies my life to use it here too. I could see going with less glue if there wasn't an expectation that pass be installed and configured on a system already. Those aren't my systems though. Either would work.
- craftyguy 9y agoOh yes, I'm not trying to convince you to change. I'm merely pointing out that this technique is not exclusive to pass, but rather that it's easily done without pass too. pass is an amazing tool!
- moviuro 9y agoDon't forget `| head -n1`, as pass(1) files can contain whatever (TOTP secrets, usernames, URLs, etc.) and only the first line contains the password
- tolmannator 9y agoGood point, but if you're retrieving a key file for example, you'd just dump the content. Pass's one key per newline isn't a hard rule.