Last active
May 19, 2018 11:39
-
-
Save carlessistare/d87751214c188e007fcb to your computer and use it in GitHub Desktop.
Output de text to copy to .travis.yml for the splitted secured ssh private key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "...=" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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