Skip to content

Instantly share code, notes, and snippets.

@neerolyte
Created April 17, 2018 04:13
Show Gist options
  • Save neerolyte/2a4886cba4ed8652bcf9819984239e8c to your computer and use it in GitHub Desktop.
Save neerolyte/2a4886cba4ed8652bcf9819984239e8c to your computer and use it in GitHub Desktop.
before_script:
# set up ssh key - it's defined under secret variables on
# https://***/*/*/settings/ci_cd
- mkdir /root/.ssh
- echo "Host example.net" > /root/.ssh/config
- echo "StrictHostKeyChecking no" >> /root/.ssh/config
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > /root/.ssh/id_rsa
- chmod 0700 /root/.ssh
- chmod 0600 /root/.ssh/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment