Skip to content

Commit

Permalink
Allow private keys to be provided to GitLab in base64 format
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish committed Dec 4, 2024
1 parent 5496fde commit cf93574
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 cf93574

Please sign in to comment.