I have .travis.yml
with some secure (encrypted) env variables. Now I need to descrypt those variables to use them in different project.
Is there easy way of doing this (except triggering a commit and printing them in console output)?
I don't think you can decrypt it. Public key is used to encrypt the data and it can only be decrypted with the private key which travis doesn't provide.
You can't decrypt locally from what I understand but you can recover the key/values. By nature, they have to be decrypted to be used during the build process.
- Go to your last build of your current project.
- Select "Debug Build"
- SSH into the instance using the provided user and host
***********@to2.tmate.io
- Once in the remote shell, run
env
.
This will print all of the environment variables so you will have to dig a little for your secure ones but they will be there.
来源:https://stackoverflow.com/questions/31519546/how-i-can-decrypt-secure-env-variables