Skip to content

slodki/travis-encrypt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

travis-encrypt-cli

Command-line Unix script to encrypt sensitive information in Travis CI .travis.yml files.

Dependencies

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

Usage

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

Alternatives

About

encryption of Travis CI settings using Bash/OpenSSL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages