首页 > 解决方案 > Travis CLI:使用“travis encrypt”加密返回 — 找不到资源 ({"file":"not found"})

问题描述

我正在尝试使用有关 Travis CI docs的命令加密.travis.yml文件中的令牌。travis encrypt 123 --add deploy.api_key --pro

相反,我进入了控制台resource not found ({"file":"not found"})

先决条件

我已经在我的机器上安装了 Travis CLI。此外,我使用 command 从 CLI 成功登录了 travis travis login --github-token {tokenHere} --com。Github 与 Travis CI 相连。

带有 --debug 的结果— 带有 --debug 的 命令结果

如果我手动访问https://api.travis-ci.com/repos/{Nickname}/HerokuTest,我会收到一个包含项目信息的 XML 文件。

拜托,你能告诉我,我怎样才能看到这里有什么问题,或者我还能在哪里寻找?

标签: travis-citravis-ci-cli

解决方案


Resource not found 基本上意味着 Travis 无法找到您的项目。据我所知,机密与项目相关联,因此 Travis 需要找到您为哪个项目生成机密。综上所述,您可能缺少 -r 标志。尝试这样的事情:

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

推荐阅读