Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Output de text to copy to .travis.yml for the splitted secured ssh private key
base64 --wrap=0 ~/.ssh/id_rsa_travis > ~/.ssh/id_rsa_travis_64
cat ~/.ssh/id_rsa_travis_64 | perl -pe 's/(.{100})/$1\n/g' | nl | perl -pe 's/\s*(\d+)\s*(.*)/echo " - secure: `travis encrypt ID_RSA_TRAVIS_$1=$2 --pro`"/' | sh
# OUTPUT
# - secure: "...="
# - secure: "...="
# - secure: "...="
# ...
# - secure: "...="
@koppor

This comment has been minimized.

Copy link

koppor commented Mar 29, 2017

For public repos, the --pro has to be removed. Then, it works like a charm! For the googlers hitting this gist: The upload functionality is described at https://gist.github.com/lukewpatterson/4242707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.