X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=uccpass;h=e4c48c774d5a562f0ce073f218f0b80888128d6f;hb=refs%2Fheads%2Fmaster;hp=fc835546af2b2dd37f087f05931d4e19f19e3e7f;hpb=03aee0a9f788743179856f89bb1470460800e98c;p=zanchey%2Fuccpass.git diff --git a/uccpass b/uccpass index fc83554..e4c48c7 100755 --- a/uccpass +++ b/uccpass @@ -37,10 +37,14 @@ init () { export PASSWORD_STORE_DIR="$UCCPASS_ROOT/store" export PASSWORD_STORE_UMASK=007 + USER=`whoami` export GIT_AUTHOR_EMAIL="$USER+wheel@ucc.gu.uwa.edu.au" export GIT_AUTHOR_NAME="`getent passwd $USER | cut -d: -f5`" export GPG_TTY=`tty` + export PASSWORD_STORE_GPG_OPTS="--trust-model always" + + export PATH=$UCCPASS_ROOT/pass/bin:$PATH if [ -n "$UCCPASS_DEBUG" ]; then set -x; fi } @@ -73,6 +77,7 @@ add_to_shell () { refresh_keys () { gpg2 --quiet --import $UCCPASS_KEYRING + gpg2 --with-colons $UCCPASS_KEYRING | grep '^pub' | cut -d: -f5 > $PASSWORD_STORE_DIR/.gpg-id } new_user_setup () { @@ -122,15 +127,6 @@ new_user_setup () { # Get the key fingerprint KEY_FINGERPRINT=`gpg --list-secret-keys --with-fingerprint --with-colons $GIT_AUTHOR_EMAIL | grep '^fpr' | head -n 1 | cut -d: -f 10` - # Add to .gpg-id - echo -n " >> Adding your key to the access list... " - if grep -qF "$KEY_FINGERPRINT" $PASSWORD_STORE_DIR/.gpg-id; then - echo "already present!" - else - echo "$KEY_FINGERPRINT" >> $PASSWORD_STORE_DIR/.gpg-id - echo "ok." - fi - # Add to key list # XXX: is it worth submitting these to an online keyserver? echo -n " >> Adding your key to the shared keyring... "