Created
February 22, 2019 08:38
-
-
Save mikybars/9ed8e45be1c1f7e56d2e261cee42d960 to your computer and use it in GitHub Desktop.
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
addons: | |
ssh_known_hosts: <deploy-host> | |
before_deploy: | |
- openssl aes-256-cbc -K $encrypted_<...>_key -iv $encrypted_<...>_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d | |
- eval "$(ssh-agent -s)" | |
- chmod 600 /tmp/deploy_rsa | |
- ssh-add /tmp/deploy_rsa |
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
$ gem install travis | |
$ cd ~/projects/myproj | |
$ ssh-keygen -t rsa -b 4096 -C 'build@travis-ci.org' -f deploy_rsa | |
$ travis login --org | |
$ travis encrypt-file deploy_rsa --add # --add updates .travis.yml | |
$ ssh-copy-id -i deploy_rsa.pub <ssh-user>@<deploy-host> | |
$ rm -f deploy_rsa deploy_rsa.pub | |
$ git add deploy_rsa.enc .travis.yml | |
$ git commit -a -m "added deploy key" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment