well i think you have to launch gpg-agent and such too. and what channel do the two use to communicate with eachother? do you need PAM configured and running? i was trapped in my initrd earlier, desperately wanting to access my passwords, and when i ran `pass <path/to/file>` it... failed. some "can't connect to gpg-agent" message or something. so then i had to figure out how to interact directly with the GPG utilities.
`gpg --decrypt <path/to/.pass/word> --gpg-private-key <path/to/.gnupg/privkeys>` (my rough recollection) was giving me obscure errors. i stumbled across some random stack overflow post telling me to use `--pinentry-mode=loopback`: i guess it wanted to show me a x11 prompt and couldn't because X wasn't running? or maybe it was some PAM thing? idk. reading passwords off an unbootable system is a super edgecase but somebody you'll find yourself in an unexpected situation and you _really don't want to have to worry about how to get out of it_ when it comes to something as critical as a password database.
if you know the ins and outs of GPG, you're probably fine. if you don't, something with fewer interactions might make more sense.
You can't encrypt new passwords to it, but you can still read old ones that are encrypted to it.
> what’s the right way to share passwords between multiple machines — can i just clone the ~/.gnupg folder, do i need to `export` and then `import` the keys? should i create subkeys for each machine?
if the keys are on a hardware smartcard like a Yubikey, I just reuse the key. if not, I use separate keys for separate hosts and encrypt my pass secrets to all of them using the .gpg-id files
> anyway, i’m using SOPS now
I think SOPS is awesome, too! it's my favorite way to securely store secrets in IaC projects
I usually have a key for each device that requires access, sometimes they overlap for all secrets and sometimes they only have access to specific folders (think a work vs. personal separation).
It's a high friction environment for sure, but I'm happy with it.
i want my password manager to be decently transparent, because if i misunderstand its failure modes that’s a big deal.
anyway, i’m using SOPS now [1]. it comes with a different set of tradeoffs (doesn’t integrate with keyrings quite as well as GPG does), but it’s way more transparent and pluggable. i generate distinct pubkey/privkey pairs per logical user and i can grant any subset of keys access to specific secrets. so e.g. my desktop and laptop can decrypt my banking secrets, but my phone cannot. i have a nightly backup cronjob which has to run unattended: i encode my Backblaze API key to the `duplicity` user’s privkey, and can safely check the encoded key into public repos and such. it’s simple and easy to grok. more so than pass, IMHO.
1: https://github.com/mozilla/sops