On 14 October 2015 at 16:47, Eregus <[email protected]> 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 [email protected]: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
> [email protected]
> 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
_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to