How to use password manager (pass) with git repository (keychain)

How to use password manager (pass) with git repository (keychain)

How to use Pass Password Manager has already been written here. I will add that Pass password manager (passwordstore.org) can be used in addition to Linux on Windows, iOS and even on phones with Android or iPhone. It is also possible to decide whether to use only commands (CLI) or graphical interface (GUI).

Now to set pass as a git repository with the ability to synchronize between all devices. The guide assumes that you have a git repository on your server (here / home / git / repo /) and you already have the pass initialized.


Set pass as git repository


SERVER


# create an empty password-store repository on the server
git init - bar password-store

CLIENT


# initialize the git repository for pass
pass git init
# set remote git repository as origin
pass git remote add user3 @ myserver:/home/git/repo/password-store
# push local git repository to server
pass git push -u --all


Using pass with git repository


CLI


# before setting new passwords - pull (download from server)
pass git pull
# after setting new passwords - push (upload to server)
pass git push

GUI - QtPass


Settings - check all Git options
Programs - Native git / gpg
Use the graphical arrows to perform git pull and git push

Possible errors if the above steps are not followed


fatal: does not appear to be a git repository


pass git push -u --all
fatal: '/home/git/repo/.password-store' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

remote: error: refusing to update checked out branch: refs/heads/master


pass git push --set-upstream origin master
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 996 bytes | 996.00 KiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To myserver:/home/git/repo/password-store
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'git@myserver:/home/git/repo/password-store'

error: remote unpack failed: unable to create temporary object directory


git push origin
Enumerating objects: 283, done.
Counting objects: 100% (283/283), done.
Delta compression using up to 4 threads
Compressing objects: 100% (148/148), done.
Writing objects: 100% (154/154), 63.08 KiB | 3.71 MiB/s, done.
Total 154 (delta 3), reused 0 (delta 0)
error: remote unpack failed: unable to create temporary object directory
To myserver:/home/git/repo/pass.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'git@myserver:/home/git/repo/pass.git'

Komentáře

Vaše reakce na Jak používat správce hesel pass s git repositářem (klíčenka)

Reference

Podívejte se na naše reference

Prohlédnout

Aplikace

Podívejte se na naše aplikace

Prohlédnout

Co umíme?

Podívejte se co umíme

Prohlédnout

Co umíme?

Vytváříme sofistikované aplikace pro náročné

Od webových aplikací přes android až po převodové můstky či složité informační systémy.

Podívejte se k nám

Máte ještě čas? Podívejte se na další rubriky

Tento web používá soubory cookie. Dalším procházením tohoto webu vyjadřujete souhlas s jejich používáním.. Více informací zde.