update-keys: switch to keyserver keyserver.ubuntu.com
As the SKS infrastructure is offline for good, we need to switch to keyserver.ubuntu.com for the time being. The Ubuntu keyservers to not support EC keys, thus we have to ignore failure when refreshing keys.
This commit is contained in:
parent
0ee9781b80
commit
9cbe1e1414
@ -9,7 +9,7 @@ export LANG=C
|
|||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
trap "rm -rf '${TMPDIR}'" EXIT
|
trap "rm -rf '${TMPDIR}'" EXIT
|
||||||
|
|
||||||
KEYSERVER='hkp://pool.sks-keyservers.net'
|
KEYSERVER='hkps://keyserver.ubuntu.com'
|
||||||
GPG=(gpg --homedir "${TMPDIR}")
|
GPG=(gpg --homedir "${TMPDIR}")
|
||||||
|
|
||||||
cat << __EOF__ > "${TMPDIR}"/gpg.conf
|
cat << __EOF__ > "${TMPDIR}"/gpg.conf
|
||||||
@ -49,7 +49,9 @@ while read -ra data; do
|
|||||||
keyid="${data[0]}"
|
keyid="${data[0]}"
|
||||||
username="${data[@]:1}"
|
username="${data[@]:1}"
|
||||||
if "${GPG[@]}" --list-keys ${keyid} >/dev/null &>/dev/null; then
|
if "${GPG[@]}" --list-keys ${keyid} >/dev/null &>/dev/null; then
|
||||||
"${GPG[@]}" --refresh-keys ${keyid} &>/dev/null
|
# Ignore refresh failure; Ubuntu keyserver lacks support for EC keys
|
||||||
|
# TODO: Remove the "|| true" when the above is no longer an issue
|
||||||
|
"${GPG[@]}" --refresh-keys ${keyid} &>/dev/null || true
|
||||||
else
|
else
|
||||||
"${GPG[@]}" --recv-keys ${keyid} &>/dev/null
|
"${GPG[@]}" --recv-keys ${keyid} &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user