Skip to content

Instantly share code, notes, and snippets.

@qnm
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qnm/972db5fc248e18eeba33 to your computer and use it in GitHub Desktop.
Save qnm/972db5fc248e18eeba33 to your computer and use it in GitHub Desktop.
gem install travis --no-ri --no-rdoc
echo "env:\n global:\n" >> .travis.yml
# encrypt SSH key - based on [squeezing private SSH key into .travis.yml file][4]
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64
# be sure to update the repository name to match the GitHub naming convention
ENCRYPTION_FILTER="echo \$(echo \" - secure: \")\$(travis encrypt -r <repo name> \"\$FILE='\`cat $FILE\`'\")"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ >> .travis.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment