Fix gpg key download in release wizard. (#279)

Old URL to check the apache id gpg key is no longer available.
This commit is contained in:
Houston Putman 2021-09-02 18:08:57 -04:00 committed by GitHub
parent 54179e9372
commit 059d06cec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1103,8 +1103,9 @@ def configure_pgp(gpg_todo):
id = str(input("Please enter your Apache id: (ENTER=skip) ")) id = str(input("Please enter your Apache id: (ENTER=skip) "))
if id.strip() == '': if id.strip() == '':
return False return False
all_keys = load('https://home.apache.org/keys/group/lucene.asc') key_url = "https://home.apache.org/keys/committer/%s.asc" % id.strip()
lines = all_keys.splitlines() committer_key = load(key_url)
lines = committer_key.splitlines()
keyid_linenum = None keyid_linenum = None
for idx, line in enumerate(lines): for idx, line in enumerate(lines):
if line == 'ASF ID: %s' % id: if line == 'ASF ID: %s' % id:
@ -1114,7 +1115,7 @@ def configure_pgp(gpg_todo):
keyid_line = lines[keyid_linenum] keyid_line = lines[keyid_linenum]
assert keyid_line.startswith('LDAP PGP key: ') assert keyid_line.startswith('LDAP PGP key: ')
gpg_id = keyid_line[14:].replace(" ", "")[-8:] gpg_id = keyid_line[14:].replace(" ", "")[-8:]
print("Found gpg key id %s on file at Apache (https://home.apache.org/keys/group/lucene.asc)" % gpg_id) print("Found gpg key id %s on file at Apache (%s)" % (gpg_id, key_url))
else: else:
print(textwrap.dedent("""\ print(textwrap.dedent("""\
Could not find your GPG key from Apache servers. Could not find your GPG key from Apache servers.