Sunday, April 29, 2018

How to generate secret for API key for Heroku deployment using Travis CI


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

  1. Navigate to your Heroku account:
  2. Find API key section and copy key
 Heroku API Key

  1. Go to project root directory
  2. 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.


  1. The most used in-memory, key-value info retailer sent being a program. Heroku Vs Aws gives potent info sorts, fantastic throughput, and also built-in help to find the best dialects.

  2. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks Kopar at Newton CEL Development

  3. This blog is so valuable. A present for the blog perusers.
    Simple project management software