- Generate a new ssh key without a passphrase:
ssh-keygen -t rsa -b 4096 -f deploy_key -C 'travis index bot' - Encrypt the generated key with a unique, secure passphrase:
gpg -c deploy_key
- Add the passphrase in an environment variable named
DEPLOY_KEY_PASSPHRASEin travis repo settings - Authorize deploy_key.pub to push to your repository on GitHub (Settings > Deploy Keys)
- Delete
deploy_keyanddeploy_key.pub - Commit
deploy_key.gpg,deploy.sh(with the executable bit set and the correct repo URL) and.travis.yml
The concurrent build limit should probably be set to 1 on travis just to be safe.