summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-21 17:23:08 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-21 17:23:08 +0200
commit9dcae25e1aa627347fccab133617412628f07d7c (patch)
tree3478c9424160ce00ee2c303431d9667417307099
parent9beb5f8b0674bb1502b92bb15d55aecf2e37b45d (diff)
downloadpass-9dcae25e1aa627347fccab133617412628f07d7c.tar.gz
pass-9dcae25e1aa627347fccab133617412628f07d7c.tar.bz2
pass-9dcae25e1aa627347fccab133617412628f07d7c.zip
Add support for PASSWORD_STORE_KEY env var.
Diffstat (limited to '')
-rw-r--r--man/pass.14
-rwxr-xr-xsrc/password-store.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/man/pass.1 b/man/pass.1
index 67dcca6..d00363b 100644
--- a/man/pass.1
+++ b/man/pass.1
@@ -42,7 +42,9 @@ extended description using \fBinit\fP and
.BR git (1).
The \fBinit\fP command must be run before other commands in order to initialize
-the password store with the correct gpg key id.
+the password store with the correct gpg key id. Passwords are encrypting using
+the gpg key set with \fBinit\fP, unless the \fBPASSWORD_STORE_KEY\fP environment
+variable is set to an alternative key id.
There is a corresponding bash completion script for use with tab completing
password names in
diff --git a/src/password-store.sh b/src/password-store.sh
index f137f55..21f8fe4 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -175,7 +175,9 @@ case "$command" in
;;
esac
-if ! [[ -f $ID ]]; then
+if [[ -n $PASSWORD_STORE_KEY ]]; then
+ ID="$PASSWORD_STORE_KEY"
+elif ! [[ -f $ID ]]; then
echo "You must run:"
echo " $program init your-gpg-id"
echo "before you may use the password store."
1 01:26:48 +0200'>2020-04-21HTML Template part of the mailRené 'Necoro' Neumann7-18/+199 2020-04-20Fixes and validationRené 'Necoro' Neumann6-28/+25 2020-04-20Fix vettingRené 'Necoro' Neumann1-1/+1 2020-04-20Started with mail creationRené 'Necoro' Neumann4-3/+126 2020-04-20FeeditemsRené 'Necoro' Neumann2-2/+14 2020-04-20GlobalOptionsRené 'Necoro' Neumann3-25/+79 2020-04-19RestructureRené 'Necoro' Neumann6-152/+177 2020-04-19Rename package 'parse' to 'feed'René 'Necoro' Neumann2-3/+3 2020-04-19SELECT is not necessary for most operations -- skip itRené 'Necoro' Neumann2-12/+1 2020-04-19Store path as array -- the delimiter is not always '.'René 'Necoro' Neumann3-36/+44 2020-04-19Split client part to client.goRené 'Necoro' Neumann2-125/+137 2020-04-19IMAP: Create foldersRené 'Necoro' Neumann1-4/+38 2020-04-19Improved IMAPRené 'Necoro' Neumann1-3/+88 2020-04-19Started IMAP connectionRené 'Necoro' Neumann4-0/+152 2020-04-19Use our own logger for debug for convenience sakeRené 'Necoro' Neumann1-2/+3 2020-04-19Fix debug logging m(René 'Necoro' Neumann1-2/+2 2020-04-19Rename util.go to log.go. Add verbose modeRené 'Necoro' Neumann4-24/+54 2020-04-19Clean go.modRené 'Necoro' Neumann2-3/+0 2020-04-19Do not print the parsedCfg anymoreRené 'Necoro' Neumann1-1/+1 2020-04-19Increase go-version to 1.14René 'Necoro' Neumann1-2/+2 2020-04-19CI: go vetRené 'Necoro' Neumann1-0/+3 2020-04-19Fetching and parsing the feedsRené 'Necoro' Neumann5-4/+113 2020-04-19Ignore all config*.ymlRené 'Necoro' Neumann1-1/+1