Unverified Commit f0782953 by Marco Dickert Committed by Christian Brauner

gpg: use proxy, if http_proxy is set

parent 56ad362c
...@@ -60,6 +60,7 @@ if [ -z "${DOWNLOAD_KEYSERVER:-}" ]; then ...@@ -60,6 +60,7 @@ if [ -z "${DOWNLOAD_KEYSERVER:-}" ]; then
# Deal with GPG over http proxy # Deal with GPG over http proxy
if [ -n "${http_proxy:-}" ]; then if [ -n "${http_proxy:-}" ]; then
DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80" DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80"
DOWNLOAD_GPG_PROXY="--keyserver-options http-proxy=\"${http_proxy}\""
fi fi
fi fi
...@@ -133,8 +134,8 @@ gpg_setup() { ...@@ -133,8 +134,8 @@ gpg_setup() {
success= success=
for _ in $(seq 3); do for _ in $(seq 3); do
if gpg --keyserver "${DOWNLOAD_KEYSERVER}" \ if $(gpg --keyserver "${DOWNLOAD_KEYSERVER}" ${DOWNLOAD_GPG_PROXY:-} \
--recv-keys "${DOWNLOAD_KEYID}" >/dev/null 2>&1; then --recv-keys "${DOWNLOAD_KEYID}" >/dev/null 2>&1); then
success=1 success=1
break break
fi fi
......
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