Intro
For some reasons recommended in the Travis-CI documentation, way does not work. Please find below what they recommend.
travis encrypt $(heroku auth:token) --add deploy.api_key
Travis-CI fails with the following error:
not logged in invalid option "--api_key="
How to generate a correct secure string
- Navigate to your Heroku account: https://dashboard.heroku.com/account
- Find API key section and copy key
- Go to project root directory
- Run the following command:
travis encrypt <api-key> -r <github-user>/<repo-name> --add deploy.api_key
That script will add a secure string to .travis.yml.