Skip to content

Commit

Permalink
Allow private keys to be provided to GitLab in base64 format (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish authored Jan 20, 2025
1 parent 62ccdb0 commit 7518a4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scaffold/gitlab/DDEV.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ cache:
- |
mkdir -p .ddev/homeadditions/.ssh
# Copy private key
if [ "$DRAINPIPE_DDEV_SSH_PRIVATE_KEY" != "" ]; then
if [ "$DRAINPIPE_SSH_PRIVATE_KEY_BASE64" != "" ]; then
echo "$DRAINPIPE_SSH_PRIVATE_KEY_BASE64" | base64 -d > .ddev/homeadditions/.ssh/id_rsa
chmod 600 .ddev/homeadditions/.ssh/id_rsa
elif [ "$DRAINPIPE_DDEV_SSH_PRIVATE_KEY" != "" ]; then
echo "$DRAINPIPE_DDEV_SSH_PRIVATE_KEY" > .ddev/homeadditions/.ssh/id_rsa
chmod 600 .ddev/homeadditions/.ssh/id_rsa
fi
Expand Down

0 comments on commit 7518a4f

Please sign in to comment.