password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 9ef311d868248682a11c8cb8c0177bc9949be7b9
parent 2e6e3fc07ed1a0ae56c653071aa1aaf6439cdafc
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Thu, 20 Mar 2014 01:33:18 -0600

git: sign commits if enabled

Diffstat:
Mman/pass.1 | 7+++++--
Msrc/password-store.sh | 3++-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/man/pass.1 b/man/pass.1 @@ -1,4 +1,4 @@ -.TH PASS 1 "2012 Sept 24" ZX2C4 "Password Store" +.TH PASS 1 "2014 March 18" ZX2C4 "Password Store" .SH NAME pass - stores, retrieves, generates, and synchronizes passwords securely @@ -118,7 +118,10 @@ If the password store is a git repository, pass \fIgit-command-args\fP as argume .BR git (1) using the password store as the git repository. If \fIgit-command-args\fP is \fBinit\fP, in addition to initializing the git repository, add the current contents of the password -store to the repository in an initial commit. +store to the repository in an initial commit. If the git config key \fIpass.signcommits\fP +is set to \fItrue\fP, then all commits will be signed using \fIuser.signingkey\fP or the +default git signing key. This config key may be turned on using: +.B `pass git config --bool --add pass.signcommits true` .TP \fBhelp\fP Show usage message. diff --git a/src/password-store.sh b/src/password-store.sh @@ -69,7 +69,8 @@ git_add_file() { [[ -d $GIT_DIR ]] || return git add "$1" || return [[ -n $(git status --porcelain "$1") ]] || return - git commit -m "$2" + [[ $(git config --bool --get pass.signcommits) == "true" ]] && sign="-S" || sign="" + git commit $sign -m "$2" } yesno() { read -r -p "$1 [y/N] " response