Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI deploy: invalid option "--secret_access_key="

I am building a Java web app with Travis CI and trying to deploy it to an AWS Elastic Beanstalk instance. The build goes well:

The command "mvn test -B" exited with 0.

... but the deploy fails and says:

Fetching: dpl-1.8.31.gem (100%)
Successfully installed dpl-1.8.31
1 gem installed

invalid option "--secret_access_key="
failed to deploy

my .travis.yml file seems to be valid and I have stored in it my encrypted secret access key for AWS using the travis CLI tool:

travis encrypt secret_access_key="< my secret access key >"

So why can't I deploy to AWS? why does Travis tell me invalid option "--secret_access_key="?

I have checked the Travis dpl docs for Elastic Beanstalk and they say the option for the key should be --secret-access-key=..., with dashes (instead of underscores like in invalid option "--secret_access_key=" from my Travis log).

How can I deploy my application?

like image 783
Giorgio Avatar asked Mar 10 '23 13:03

Giorgio


1 Answers

I also encountered this issue and it was because the encrypted environment variable I used for secret_access_key: was spelled incorrectly. Most likely the value used here is wrong or non-existent and will produce this error.

secret_access_key: $ENCRYPTED_VAR_SPELLED_WRONG

like image 136
Earl Avatar answered Mar 14 '23 23:03

Earl