Command-line Unix script to encrypt sensitive information in
Travis CI .travis.yml files.
There is no need to have Ruby and Travis CLI installed. With this script you only need:
- curl to download RSA public key from Travis repo API
- OpenSSL with RSA support to encrypt text
- Bash to run script
echo -n 'your_api_key' | ./encrypt_for_travis.bash user/repo echo -n 'variable=value' | ./encrypt_for_travis.bash user/repo You must use echo -n to not add newline character at the end of the encoded string. For the same reason you cannot use here strings like:
<<<'variable=value' ./encrypt_for_travis.bash user/repo
If you need proxy to access Travis website you should define HTTPS_PROXY environment variable for curl globally or per request:
echo -n 'variable=value' | HTTPS_PROXY='10.0.1.7:8080' ./encrypt_for_travis.bash user/repo - Travis CLI official tool
- Online tool using JavaScript
- third-party tools