2

I am trying to encrypt token in .travis.yml file using command travis encrypt 123 --add deploy.api_key --pro regarding Travis CI docs.

Instead I got in console resource not found ({"file":"not found"})

Prerequisites:

I have installed Travis 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.

Result with --debug — command result with --debug

If I go manually to https://api.travis-ci.com/repos/{Nickname}/HerokuTest I receive an XML file with info about the project.

Please, can you tell me, how can I see what is wrong here, or where else I can seek?

  • I am having same problem – jpell Aug 23 '21 at 17:56
  • @jpell Actually, I haven't found a solution, I just tried same command "travis encrypt 123 --add deploy.api_key --pro" and it is working now for some reason. There was new string in CLI: Detected repository as Nickname/repo, is this correct? |yes| yes – Dmytro Pavlov Sep 02 '21 at 14:28

1 Answers1

0

Resource not found basically means that Travis isn't able to find your project. As far as I know, secrets are associated with the project, so Travis needs to find which project are you generating your secrets for. All that said, you're probably missing the -r flag. Try something like this:

travis encrypt aws_secret_access_key=very_secret_string -r mygithubusername/reponame --com  
ouflak
  • 2,458
  • 10
  • 44
  • 49
  • It is working now without -r flag, I don't have any ideas what was wrong, and why is it working now. Just used same command. – Dmytro Pavlov Sep 02 '21 at 14:31