未经授权的加密密钥Travis→Heroku [英] Encrypted key unauthorized for continuous deployment Travis → Heroku

查看:141
本文介绍了未经授权的加密密钥Travis→Heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置 CoinsManager ,以便 alpha版本会在Travis持续集成之后自动部署。



这是我们的 .travis。 yml 文件:
$ b

  language:node_js 
node_js:
- '0.10'
before_install:
- make install
服务:
- mongodb
部署:
提供程序:heroku
应用程序:coinsmanager
API_KEY:
放心: FjcbJdgcB1IIug3Qf5oFlF5PHW8LYnIUJCSUEz7GI5i6tVvtye1UvqkA12BP + // u3rtPcO3d33rjNY5 / qvIRIdJ / wMKACAHdzRa8jWge2dxW7filynF6LVsh5ezwr7Sq / MgNwvqQcRp7eQNsOlBzdZRyQYE0VAa4fAD1 + SZPnWQ =
上:
all_branches:真正的
after_deploy:
- cd app / client / compass&& compass compile&& cd -
- cd app /&& meteor reset
- restart

问题是T ravis报告出现以下错误

 预期的(200)=>实际(401未经授权)
正文:{\id \:\unauthorized \,\error \:\提供的凭证无效。错误的API密钥?)
未能部署

但我确实很喜欢建议的文档

  $ travis encrypt $(heroku auth:token)--add deploy.api_key 



<我也尝试了几个不同的情况(带或不带双引号),如在该Github问题



我不确定问题来自哪里:Travis? Heroku?

解决方案

我解决了我的问题。

CoinsManager / CoinsManager 的上游回购,我在 Fandekasp / CoinsManager 分支。当运行travis加密时,travis从我的原始remote获取repo名称,而不是查询heroku git repo。

因此,我需要指定正确的repo为如下:
$ b $ pre $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ travis encrypt -r CoinsManager / CoinsManager $(heroku auth:token)--add deploy.api_key


I'm trying to configure CoinsManager so that the alpha version gets auto-deployed after Travis Continuous Integration.

Here is our .travis.yml file:

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

The problem is Travis reporting the following error:

Expected(200) <=> Actual(401 Unauthorized)
body: "{\"id\":\"unauthorized\",\"error\":\"Invalid credentials provided.\"}" (wrong API key?)
failed to deploy

But I did exactly like the doc recommended

$ travis encrypt $(heroku auth:token) --add deploy.api_key

I also tried slighly different cases (with or without dash an double quotes), as suggested in that Github issue.

I'm not sure where the problem comes from: Travis? Heroku?

解决方案

I solved my problem.

We have the upstream repo at CoinsManager/CoinsManager, which I forked at Fandekasp/CoinsManager. And when running travis encrypt, travis is getting the repo name from my origin remote, instead of querying the heroku git repo.

Therefore, I needed to specify the correct repo as follow:

$ travis encrypt -r CoinsManager/CoinsManager $(heroku auth:token) --add deploy.api_key

这篇关于未经授权的加密密钥Travis→Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆