为 Travis CI 加密环境变量时获取公钥时出错 [英] Error fetching public key while encrypting environment variable for Travis CI
问题描述
我正在使用 travis (0.0.6)
并且遇到与 Add 中所述相同的错误Travis CI 的秘密环境变量:
I'm using travis (0.0.6)
and I get the same error as described in Add secret environment variable to Travis CI:
[bdu-padrino (master)]$ travis 加密 mariusbutuc/bdu-padrino MY_SECRET_ENV=super_secret
[bdu-padrino (master)]$ travis encrypt mariusbutuc/bdu-padrino MY_SECRET_ENV=super_secret
即将为'mariusbutuc/bdu-padrino'加密'MY_SECRET_ENV=super_secret'
About to encrypt 'MY_SECRET_ENV=super_secret' for 'mariusbutuc/bdu-padrino'
获取公钥时出错,请检查您是否输入了正确的 slug
There was an error while fetching public key, please check if you entered correct slug
即使在编辑lib/travis/cli/secure_key.rb之后
到
- 使用 https 或 http URL 来检索公钥,
- 要么跳过SSL 证书验证.
- use either https or http URL to retrieve the public key,
- either skip the SSL certificate verification or not.
我还可以检查什么以确保加密有效?
What else can I check to ensure encrypting works?
同样在浏览器中,travis-ci.org/mariusbutuc/bdu-padrino.json 显示永远加载...
Also in the browser, travis-ci.org/mariusbutuc/bdu-padrino.json shows Loading forever...
这里会呈现什么?
推荐答案
Version 0.0.6
—或0.0.10
之前的任何版本—失败,因为密钥端点已更改.
Version 0.0.6
—or any version prior to 0.0.10
—fails because the endpoint for keys has been changed.
要修复它,只需将 lib/travis/cli/secure_key.rb
更新为 0.0.10
版本,
或更新 gem.
To fix it, simply update lib/travis/cli/secure_key.rb
to the one in version 0.0.10
,
or update the gem.
这篇关于为 Travis CI 加密环境变量时获取公钥时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!