Skip to content

Commit

Permalink
fix: remove ~ from double quotes
Browse files Browse the repository at this point in the history
Attempting to `chmod` the key failed due to the `~` contained within the double quotes.
  • Loading branch information
jackhodgkiss committed Apr 10, 2024
1 parent 3c41015 commit 1a8f2c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ function setup_ssh_agent {
function inject_ssh_keys {
# These are read when generating kolla passwords
if [ ! -z ${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY:+x} ]; then
echo "${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY}" >"~/.ssh/${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}"
chmod 600 "~/.ssh/${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}"
ssh-keygen -y -f "~/.ssh/${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}" >"~/.ssh/${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}.pub"
chmod 600 "~/.ssh/${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}.pub"
echo "${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY}" >~/.ssh/"${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}"
chmod 600 ~/.ssh/"${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}"
ssh-keygen -y -f ~/.ssh/"${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}" >~/.ssh/"${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}.pub"
chmod 600 ~/.ssh/"${KAYOBE_AUTOMATION_SSH_PRIVATE_KEY_NAME}.pub"
fi
}

Expand Down

0 comments on commit 1a8f2c0

Please sign in to comment.