Commit 5cea1f6d authored by Chaoting Liu's avatar Chaoting Liu
Browse files

minimize gpg.conf

parent 1c04588a
......@@ -13,11 +13,10 @@ _log command "SSH setup"
# In order to properly check the server's host key, assuming you created the
# SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
# instead.
_do mkdir -p ~/.ssh
_do install -dm700 ~/.ssh
[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
_do chmod 600 ~/.ssh/id_rsa
_do chmod 700 ~/.ssh
# Run ssh-agent (inside the build environment)
_do eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
......@@ -27,10 +26,7 @@ _do ssh-add ~/.ssh/id_rsa
_log command "GPG setup"
# Configure gpg.conf
_do install -dm700 ~/.gnupg
_do printf "\nkeyserver-options auto-key-retrieve\n
auto-key-locate local,wkd\n
pinentry-mode loopback\n
passphrase $GPG_PASSWORD" >> ~/.gnupg/gpg.conf
_do echo "\npinentry-mode loopback\npassphrase $GPG_PASSWORD" >> ~/.gnupg/gpg.conf
_do gpg -v --batch --import <(echo "$GPG_PRIVATE_KEY")
# Configure gpg-agent.conf
_do echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment