Invalid option "--api_key=" for deploy: heroku

Here’s the link to my deploy: https://travis-ci.com/github/JoshuaPelealu/catalactics-bot/builds/173044380.

I don’t know what’s wrong, I logged in and generated the Api key for heroku, then I deployed it, and it doesn’t really work. When I looked at the log, there is another error, saying not Logged in.

Thanks in advance!!

Your api key encryption is wrong. That’s really the best I can say. Since you are running the build on https://travis-ci.com, ensure that your travis encrypt command includes --pro flag.

I actually did use the --pro flag.

, but it still doesn’t work. Is it because I put the flag at the end? Maybe that’s the reason it is incorrect?

If you have access to a non-Windows machine, could you try using that instead?

Does Windows Subsystem for Linux (WSL) Ubuntu Works? Or do I have to use a different OS?

That’s a good question. I don’t have an answer. You can try WSL first, and if not, maybe a Docker container can work?

$(heroku auth:token) is Bash syntax while you are using Cmd in the screenshot. So as a result, that exact line (or some part thereof) gets encrypted instead.

2 Likes

To solve this issue,
Since cmd can’t run Bash syntax.

  1. Navigate to your Heroku account: https://dashboard.heroku.com/account
  2. Find API key section and copy key
  3. Go to project root directory
  4. Run the following command:

travis encrypt <api-key> -r <github-user>/<repo-name> --add deploy.api_key

1 Like