在使用 Heroku 部署时,我不断收到此错误,并且在通过 Travis 运行构建后尝试部署到 Heroku 时,我一直收到几个不同的报告。
No stash entries found.
API request failed.
Message: Invalid credentials provided.
Reference:
failed to deploy
我没有得到比这更多的信息。我尝试更新我的 Heroku API 密钥,但这似乎不起作用。我用过Travis setup Heroku
命令以及手动创建构建步骤,但我仍然遇到相同的错误。这是我的 .travis.yml 文件的部署部分的样子
部署:
提供商:heroku
api_key:
安全:g3gj25vI58r48P63E...
应用程序:heroku-travis-test-01
在:
仓库:andrico1234/heroku-travis-test
这是一个常见问题吗?
编辑:添加 Travis 的安装依赖项堆栈跟踪
2.71s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Fetching: dpl-1.10.0.gem (100%)
Successfully installed dpl-1.10.0
1 gem installed
dpl.1
Installing deploy dependencies
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.15.2.gem (100%)
Successfully installed faraday-0.15.2
Fetching: rendezvous-0.1.2.gem (100%)
Successfully installed rendezvous-0.1.2
Fetching: netrc-0.11.0.gem (100%)
Successfully installed netrc-0.11.0
Fetching: dpl-heroku-1.10.0.gem (100%)
Successfully installed dpl-heroku-1.10.0
5 gems installed
因为某些原因heroku auth:token
即使在确保我在命令行上登录到heroku之后,仍然为我返回错误的令牌。
在尝试了发布的所有解决方案后,对我有用的是:
- Go to Heroku 账户 https://dashboard.heroku.com/account
- Manually copy the API Key and then paste it into command line:
- 对于托管在travis-ci.com https://travis-ci.com:
travis encrypt pasteAPIKeyHere --add deploy.api_key --pro
- 对于托管在travis-ci.org https://travis-ci.org:
travis encrypt pasteAPIKeyHere --add deploy.api_key --org
希望这可以帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)