@@ -34,12 +34,6 @@ prepare() {
34
34
SSH_PUBLIC_KEY_FILE=$( mktemp)
35
35
printf " %s" " ${SSH_PUBLIC_KEY} " >> " ${SSH_PUBLIC_KEY_FILE} "
36
36
37
- git config --local commit.gpgsign true
38
- git config --local user.signingkey " ${SSH_PUBLIC_KEY_FILE} "
39
- git config --local tag.forceSignAnnotated true
40
- git config --local gpg.format ssh
41
- log_verbose " Git SSH sign key is set"
42
-
43
37
if [ -n " ${SSH_KEY_PASSPHRASE-} " ]; then
44
38
SSH_ASKPASS_FILE=$( mktemp)
45
39
chmod 0755 " ${SSH_ASKPASS_FILE} "
@@ -50,12 +44,14 @@ prepare() {
50
44
log_verbose " Git SSH passphrase set"
51
45
fi
52
46
53
- if ! ssh-add -L | grep -q " ${SSH_PUBLIC_KEY-} " ; then
54
- printf " %s" " ${SSH_PRIVATE_KEY} " | base64 --decode | ssh-add -
55
- log_verbose " Git SSH key import loaded"
56
- else
57
- log_verbose " Git SSH key import skipped"
58
- fi
47
+ printf " %s" " ${SSH_PRIVATE_KEY} " | base64 --decode | ssh-add -
48
+ log_verbose " Git SSH key import loaded"
49
+
50
+ git config --local commit.gpgsign true
51
+ git config --local user.signingkey " ${SSH_PUBLIC_KEY_FILE} "
52
+ git config --local tag.forceSignAnnotated true
53
+ git config --local gpg.format ssh
54
+ log_verbose " Git SSH sign key is set"
59
55
60
56
if [ -n " ${SSH_KEY_PASSPHRASE-} " ]; then
61
57
rm -rf " ${SSH_ASKPASS} "
0 commit comments