File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,24 @@ declare -r SECRING_AUTO="${GPG_HOME}/secring.auto"
1414declare -r PUBRING_AUTO=" ${GPG_HOME} /pubring.auto"
1515
1616mkdir -p " $GPG_HOME "
17+ chmod 700 " $GPG_HOME "
1718cp " ${DIR} " /* .auto* " ${GPG_HOME} "
1819
20+ echo -e " \nImporting public keys..."
21+ { gpg --home " ${GPG_HOME} " --import " ${PUBRING_AUTO} " ; } || { err_exit " Could not import public key into gpg." ; }
22+ echo " Success!"
23+
1924echo -e " \nDecrypting secret key..."
2025{
2126 # $GPG_PASSWORD is taken from the script's env (injected by CI).
22- echo $GPG_PASSWORD | gpg --decrypt \
23- --pinentry-mode loopback --batch \
27+ echo $GPG_PASSWORD | gpg --home " ${GPG_HOME} " -- decrypt \
28+ --pinentry-mode loopback --yes \
2429 --passphrase-fd 0 \
2530 --output " ${SECRING_AUTO} " \
2631 " ${SECRING_AUTO} " .gpg ; \
2732} || { err_exit " Failed to decrypt secret key." ; }
2833echo " Success!"
2934
30- echo -e " \nImporting keys..."
31- { gpg --home " ${GPG_HOME} " --import " ${PUBRING_AUTO} " ; } || { err_exit " Could not import public key into gpg." ; }
35+ echo -e " \nImporting private keys..."
3236{ gpg --home " ${GPG_HOME} " --import " ${SECRING_AUTO} " ; } || { err_exit " Could not import secret key into gpg." ; }
3337echo " Success!"
You can’t perform that action at this time.
0 commit comments