[pass] Transfer password store to a server
Chris Warrick
kwpolska at gmail.com
Wed Oct 14 16:56:05 CEST 2015
On 14 October 2015 at 16:47, Eregus <eregus at installgentoo.com> wrote:
> Hello,
>
> I want to transfer my password store from desktop to a server, so I can pull
> it on my phone easily. And I have no idea how to do it. This is what I
> tried:
>
> On my server:
> mkdir pass-store; cd pass-store; git init --bare
> And then on my desktop:
> pass git remote add origin me at myserver.com:pass-store; pass git push origin
> master
>
> Everything was done without any erors, but I don't see any passwords in
> ~/pass-store, only git files. Could you help me with this? I'm not really
> familiar with git.
>
> Cheers,
> Eregus
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
This is a bare repository, which is the .git directory only. The
default behavior of Git is to allow pushing to bare repositories only.
If you want a backup without using `pass` on the server, you don’t
have to do anything special. Just point your phone at the same remote.
However, if you want to use `pass` on the server, you should create
another non-bare repo that would be used by `pass` and add a Git hook
that would update it. (there’s also a git misfeature that could let
you push to a non-bare repo; don’t use it)
The hook file you are looking for is ~/pass-store/hooks/post-receive,
and it can just run /usr/bin/pass git pull or whatever you need to
make things work.
--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
More information about the Password-Store
mailing list