问题
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 encrypt mariusbutuc/bdu-padrino MY_SECRET_ENV=super_secret
About to encrypt 'MY_SECRET_ENV=super_secret' for 'mariusbutuc/bdu-padrino'
There was an error while fetching public key, please check if you entered correct slug
even after editing lib/travis/cli/secure_key.rb to
- 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?
Also in the browser, travis-ci.org/mariusbutuc/bdu-padrino.json shows Loading forever...
What's expected to be rendered here?
回答1:
Version 0.0.6
—or any version prior to 0.0.10
—fails because the endpoint for keys has been changed.
To fix it, simply update lib/travis/cli/secure_key.rb
to the one in version 0.0.10,
or update the gem.
来源:https://stackoverflow.com/questions/14072266/error-fetching-public-key-while-encrypting-environment-variable-for-travis-ci