Skip to content

Commit 45f652e

Browse files
jangel97jrusz
authored andcommitted
fix: chmod 600 SSH signing key before use
GitLab runner writes file-type CI variables with 0666 permissions. ssh-keygen refuses to use a private key that is world-readable, causing git commit signing to fail. Signed-off-by: Jose Angel Morena <jmorenas@redhat.com>
1 parent d945ebf commit 45f652e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ fi
4848

4949
# Configure git commit signing
5050
if [ -n "${GIT_SSH_SIGNING_KEY:-}" ]; then
51+
chmod 600 "$GIT_SSH_SIGNING_KEY"
5152
git config --global gpg.format ssh
5253
git config --global user.signingkey "$GIT_SSH_SIGNING_KEY"
5354
git config --global commit.gpgsign true

0 commit comments

Comments
 (0)