Encryption not finding my secrets

I am trying to encrypt a token in yaml file using command travis encrypt 123 --add deploy.api_key --pro to deploy to heroku.

instead I got in console resource not found (file not found)

I have installed the CLI on my machine. Also I successfully logged in travis from CLI with command travis login --github-token {tokenHere} --com. Github is connected with Travis CI.

I receive an XML file with info about the project, saying it cannot find the secrets.

When Travis says Resource not found that basically means that Travis isn’t able to find your project. Whether that be locally or in GitHub. Secrets are associated with the project, so Travis needs to find which project are you generating your secrets for. You’re probably missing the -r flag. Try something like this:

travis encrypt aws_secret_access_key=very_secret_string -r mygithubusername/reponame --com  

That should get you going, and then recheck the XML file.

1 Like