From 543c13fa1988565877b483ee001b4ff1c3e12a22 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Mon, 20 Aug 2018 09:58:08 +0200 Subject: Fixed GPG keyserver intermittenly failure Workaround about issue with the particular GPG keyserver: trying several explicit keyservers until the command succeeds Change-Id: If0eba5e7a123ea56ee0adadeb69ab7c89301ae5c Signed-off-by: Sebastien Douheret --- scripts/get-syncthing.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get-syncthing.sh b/scripts/get-syncthing.sh index 5362573..433a88d 100755 --- a/scripts/get-syncthing.sh +++ b/scripts/get-syncthing.sh @@ -60,7 +60,17 @@ if [ "$?" != 0 ]; then exit 1 fi -${GPG} -q --keyserver pool.sks-keyservers.net --recv-keys 37C84554E7E0A261E4F76E1ED26E6ED000654A3E || exit 1 +# Workaround about issue with the particular GPG keyserver: +# trying several explicit keyservers until the command succeeds +# (see https://github.com/jacobalberty/unifi-docker/issues/64) +for server in $(shuf -e pool.sks-keyservers.net \ + ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do + ${GPG} -q --keyserver "$server" --recv-keys 37C84554E7E0A261E4F76E1ED26E6ED000654A3E && break || : +done tarball="syncthing-${GOOS_ST}-${GOARCH}-v${SYNCTHING_VERSION}.${TB_EXT}" \ && curl --connect-timeout 60 --retry 3 -sfSL "https://github.com/syncthing/syncthing/releases/download/v${SYNCTHING_VERSION}/${tarball}" -O \ -- cgit 1.2.3-korg