What do I need for Travis-CI to decrypt secure variables on my fork?

烂漫一生 提交于 2019-12-07 16:23:13

问题


I have forked a Github repository and would like to use travis-ci, as the original repository does, to run tests when I commit. However, the AWS keys, which are encrypted, are not decrypted and keep the tests from succeeding. Since my workplace owns the original repository, I have access to whatever is needed, but am unsure what information to retrieve, where to find it, or what to do with it.

For clarity, here is the pertinent part of the .travis.yml:

env:
  global:
  - NODE_ENV: test
  - [...]
  - secure: M3YSEJnWYd[...]
  - secure: kvvLABsWTq[...]

All of the environment variables are imported except the secure ones (which is to be expected, of course).


回答1:


Travis documents that for security reasons secret variables are not available to forks (https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml). It should be possible though to set new secrets in travis.yml or fork‘s repo settings.



来源:https://stackoverflow.com/questions/32362855/what-do-i-need-for-travis-ci-to-decrypt-secure-variables-on-my-fork

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!