gpg-import 510 Bytes
Newer Older
1 2
#!/usr/bin/env bash

3 4 5 6
GPG_CONF=".gnupg/gpg.conf"
GPG_AGENT_CONF=".gnupg/gpg-agent.conf"
OPENSSL_CLI_OPTS="enc -aes-256-cbc -K ${OPENSSL_ENC_KEY} -iv ${OPENSSL_ENC_IV}"

7 8
openssl ${OPENSSL_CLI_OPTS} -d -in ${CI_GITLAB_PATH}/code-signing-key.asc.enc -out ${CI_GITLAB_PATH}/code-signing-key.asc
gpg --quiet --batch --import ${CI_GITLAB_PATH}/code-signing-key.asc
9

10
echo "use-agent" > ${HOME}/${GPG_CONF}
11 12
echo "pinentry-mode loopback" >> ${HOME}/${GPG_CONF}
echo "allow-loopback-pinentry" > ${HOME}/${GPG_AGENT_CONF}