Travis-CI需要什么来解密我的fork上的安全变量? [英] What do I need for Travis-CI to decrypt secure variables on my fork?

查看:87
本文介绍了Travis-CI需要什么来解密我的fork上的安全变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经分叉了一个Github存储库,并希望像原始存储库一样使用travis-ci在提交时运行测试。但是,未经已加密的AWS密钥不会被解密,并且无法使测试成功。由于我的工作场所拥有原始存储库,因此我可以访问所需的任何内容,但是不确定要检索哪些信息,在哪里找到它或对其进行处理。

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.

为清楚起见,这是.travis.yml的相关部分:

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).

推荐答案

Travis文档,出于安全原因,机密变量不可用于fork( https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in- travisyml )。不过,应该可以在travis.yml或fork的存储库设置中设置新的机密。

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.

这篇关于Travis-CI需要什么来解密我的fork上的安全变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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