aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-18 09:07:44 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-18 09:07:44 -0300
commit5f28219deaf99a79401a080c52a60b8c2b06d1e6 (patch)
tree6f94ecf70c92fba068c31627d06e95c57925a7e4
parent213b4bae731d0893b6fb5fa3ded8f58ec7149639 (diff)
downloadhydra-5f28219deaf99a79401a080c52a60b8c2b06d1e6.tar.gz
hydra-5f28219deaf99a79401a080c52a60b8c2b06d1e6.tar.bz2
Use --batch at hydra_import_keys_openpgp
-rwxr-xr-xshare/hydra/import-keys4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/hydra/import-keys b/share/hydra/import-keys
index b5953cb..692e5eb 100755
--- a/share/hydra/import-keys
+++ b/share/hydra/import-keys
@@ -21,6 +21,8 @@ source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
# Import OpenPGP keypair
+# See https://superuser.com/questions/1135812/gpg2-asking-for-passphrase-when-importing-secret-keys#1135950
+# https://dev.gnupg.org/T2313
function hydra_import_keys_openpgp {
key="$(keyringer $HYDRA decrypt nodes/$hostname/gpg/key 2> /dev/null | sed -ne '1,$p')"
pubkey="$(keyringer $HYDRA decrypt nodes/$hostname/gpg/key.pub 2> /dev/null | sed -ne '1,$p')"
@@ -40,7 +42,7 @@ function hydra_import_keys_openpgp {
echo "Importing gpg key to $node..."
echo "-----------------------------"
echo ""
- echo -e "${passphrase}\n${key}" | sudo gpg --passphrase-fd 0 --no-tty --homedir /root/.gnupg --import
+ echo -e "${passphrase}\n${key}" | sudo gpg --passphrase-fd 0 --batch --no-tty --homedir /root/.gnupg --import
echo ""
echo "Trusting key $key_id at $node..."