File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 5
5
echo " Starting PMCD"
6
6
/usr/libexec/pcp/lib/pmcd start
7
7
8
+ # Setup GPG agent in this container to allow preset passphrases
9
+ mkdir -p /root/.gnupg
10
+ chmod -R 500 /root/.gnupg
11
+ echo allow-preset-passphrase >> /root/.gnupg/gpg-agent.conf
12
+
8
13
echo " Importing GPGKEY"
9
14
# this trick allows the GPG secret key to be imported via the command line
10
15
# thank goodness for Google
11
16
echo $MAVEN_GPG_PASSPHRASE | gpg --batch --yes --passphrase-fd 0 --import /root/gpgkeyexport/gpgkey.prvt.asc
12
17
18
+ # now iterate over each KEYGRIP you can see and preset the passphrase (one of them will be the right one)
19
+ echo " Dumping keygrips"
20
+ gpg --list-secret-keys --with-keygrip
21
+ for KEYGRIP in ` gpg --list-secret-keys --with-keygrip | grep Keygrip | awk -F = ' {print $2}' ` ; do /usr/libexec/gpg-preset-passphrase --preset --passphrase $MAVEN_GPG_PASSPHRASE $KEYGRIP ; done
22
+
23
+ # now do a simple GPG sign to 'prime' the gpg to ensure when Maven ends up running this GPG cache thing is ready
24
+ echo " Doing a fake GPG signing now to prime the GPG agent password cache"
25
+ echo " test" | gpg --clearsign
13
26
14
27
echo " Adding Github to known_hosts files"
15
28
# see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints
You can’t perform that action at this time.
0 commit comments