I just installed pass on my primary machine and I really like using it. I work on three or four machines and I'd like to synchronize all the passwords I have under
~/.password-store to all my machines. Is this possible? If so, what would be the safest way to do so?
The simplest way that comes to one's mind (especially of someone who doesn't know what
pass is): use SSH - i.e.
ssh would work as well).
Yet looking at the pass webpage:
It is a very short and simple shell script. It's capable of temporarily putting passwords on your clipboard and tracking password changes using
offers a more elegant method. Just use a Git repository as storage backend and you're all set.
If you always edit your passwords on the same machine, use rsync:
rsync -a ~/.password-store foo.example.com:
to repliacate them from the current machine to
rsync -a master.example.com:.password-store ~
to replicate them from
master.example.com to the current machine.
If you edit your passwords on different machines, you can use Unison, which is like rsync, but bidirectional. Pick one machine as the master, say
master.example.com. On each other machine, create a profile file
root = /home/brian/.password-store root = ssh://master.example.com/.password-store
unison -auto passwords from
foo.example.com to propagate changes made since the last synchronization. Unison will automatically determine which side has the newer content on a per-file basis, and will ask you to pick if a file has been changed on both sides.