Skip to content

Commit c234e6d

Browse files
author
ericchung
committed
try to fix gpg key not found on ubuntu keyserver
1 parent 647fe6d commit c234e6d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/gpg.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ gpg --batch --gen-key gen-key-script
2929
# uid Lars K.W. Gohlke <[email protected]>
3030
# ssb 4096R/CC1613B2 2016-09-08
3131
# ssb 4096R/55B7CAA2 2016-09-08
32-
gpg -K --keyid-format=short
33-
export GPG_KEYNAME=$(gpg -K --keyid-format=short | grep ^sec | cut -d/ -f2 | cut -d\ -f1 | head -n1)
32+
gpg -K --keyid-format=0xshort
33+
export GPG_KEYNAME=$(gpg -K --keyid-format=0xshort | grep ^sec | cut -d/ -f2 | cut -d\ -f1 | head -n1)
3434

3535
# cleanup local configuration
3636
shred gen-key-script
@@ -48,5 +48,9 @@ while(true); do
4848
date
4949
GNUPGHOME=./gpgtest gpg --keyserver keyserver.ubuntu.com --recv-keys ${GPG_KEYNAME} && break || sleep 30
5050
done
51+
52+
echo "Waiting for 2 minutes to let the key being synced"
53+
sleep 120
54+
5155
echo "Key ${GPG_KEYNAME} uploaded to keyserver.ubuntu.com"
5256
rm -rf ./gpgtest

.github/workflows/mvnsettings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<activeByDefault>true</activeByDefault>
1919
</activation>
2020
<properties>
21+
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
2122
<gpg.executable>gpg</gpg.executable>
2223
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
2324
</properties>

0 commit comments

Comments
 (0)