Adr*_*ire 2 heroku travis-ci meteor
我正在尝试配置CoinsManager,以便在Travis持续集成后自动部署alpha版本.
这是我们的.travis.yml文件:
language: node_js
node_js:
- '0.10'
before_install:
- make install
services:
- mongodb
deploy:
  provider: heroku
  app: coinsmanager
  api_key:
    secure: "FjcbJdgcB1IIug3Qf5oFlF5PHW8LYnIUJCSUEz7GI5i6tVvtye1UvqkA12BP+//u3rtPcO3d33rjNY5/qvIRIdJ/wMKACAHdzRa8jWge2dxW7filynF6LVsh5ezwr7Sq/MgNwvqQcRp7eQNsOlBzdZRyQYE0VAa4fAD1+SZPnWQ="
  on:
    all_branches: true
after_deploy:
- "cd app/client/compass && compass compile && cd -"
- "cd app/ && meteor reset"
- restart
问题是Travis报告了以下错误:
Expected(200) <=> Actual(401 Unauthorized)
body: "{\"id\":\"unauthorized\",\"error\":\"Invalid credentials provided.\"}" (wrong API key?)
failed to deploy
但我确实喜欢推荐的文档
$ travis encrypt $(heroku auth:token) --add deploy.api_key
我还尝试了一些略有不同的案例(有或没有双引号),如Github问题所示.
我不确定问题出在哪里:特拉维斯?Heroku的?
我解决了我的问题.
我们在CoinsManager/CoinsManager上有上游回购,我在Fandekasp/CoinsManager分叉.当运行travis encrypt时,travis从我的原始远程获取repo名称,而不是查询heroku git repo.
因此,我需要指定正确的回购如下:
$ travis encrypt -r CoinsManager/CoinsManager $(heroku auth:token) --add deploy.api_key
| 归档时间: | 
 | 
| 查看次数: | 1043 次 | 
| 最近记录: |