Travis-ci解密加密文件 [英] Travis-ci decryption of encrypted files
本文介绍了Travis-ci解密加密文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已加密.env文件,现在有一个 .env.enc
文件。我的团队如何解密呢?
加密文件时收到此响应,并将其存储在我的.travis.yml文件中
I encrypted my .env file, and I now have a .env.enc
file. How does my team decrypt this?
I got this response when I encrypted the file, and it is stored in my .travis.yml file
openssl aes-256-cbc -K $encrypted_cf94abc85bdc_key -iv $encrypted_cf94abc85bdc_iv -in .env.enc -out .env -d
我在终端上尝试了这个,我得到了:
I tried that on the terminal and this I just get:
iv undefined
我尝试使用travis-cli进行解密:
I tried decrypting with the travis-cli:
travis encrypt-file .env.enc .env -d
我刚刚得到了这个:
key must be 64 characters long and a valid hex number
我用键和iv尝试过
travis encrypt-file .env.enc .env -d -K $encrypted_cf94abc85bdc_key -iv $encrypted_cf94abc85bdc_iv
我检查了Travis env变量存在,并且它们确实存在:
I checked if the travis env variables exist, and they do:
encrypted_cf94abc85bdc_key=[secure]
encrypted_cf94abc85bdc_iv=[secure]
推荐答案
检查 travis加密文件
!
特别是第一行:
encrypting <filename> for <repository name>
[..]
您需要输入正确的存储库(并使用-com
(如果需要)),以确保Travis会找到以后需要的生成值。
You need to be in the correct repo (and use --com
if needed) to be sure that Travis will find the generated values it later needs.
这篇关于Travis-ci解密加密文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文