Skip to main content

Encrypt passwords for use with Travis CI.

Project description

header.png

travis coverage dependencies scrutinizer format version license pyversions implementation status

Travis Encrypt is a Python command line application that provides an easy way to encrypt passwords and environment variables for use with Travis CI. All passwords and environment variables are encrypted with the PKCS1v15 padding scheme as it’s the only padding supported by Travis CI.

Installation

To install Travis Encrypt simply run the following command in a terminal window:

$  pip install travis-encrypt

If you would rather install from source, run the following commands in a terminal window:

$  git clone https://github.com/mandeep/Travis-Encrypt.git
$  cd Travis-Encrypt
$  python setup.py install

Travis Encrypt will attempt to install the cryptography package, however the package requires development packages for C and Python. If installation fails, please see the cryptography installation guide: https://cryptography.io/en/latest/installation/

Usage

With Travis Encrypt installed, the command line application can be invoked with the following command and arguments:

usage: travis-encrypt [options] github_username repository [path]

positional arguments:
    github_username         GitHub username that houses the repository
    repository              Name of the repository whose password requires encryption
    path                    Path to the repository's .travis.yml file

optional arguments:
    --help                  Show the help message and quit
    --deploy                Encrypt a password for continuous deployment usage
    --env                   Encrypt an environment variable
    --clipboard             copy the encrypted password to the clipboard

When the command is entered, the application will issue a prompt where the user can enter either a password or environment variable. In both cases, the prompt will print ‘Password:’. Once the prompt is answered, Travis Encrypt will print the encrypted password to standard output. If a path to .travis.yml is provided the encrypted password will be written to .travis.yml instead of printing to standard output.

Example of password encryption (the password is hidden when entering):

$  travis-encrypt mandeep Travis-Encrypt
Password:
Please add the following to your .travis.yml:

secure: "oxTYla2fHNRRjD0akv1e..." (edited for brevity)

Example of deployment password encryption:

$  travis-encrypt --deploy mandeep Travis-Encrypt /home/user/.travis.yml
Password:
Encrypted password added to /home/user/.travis.yml

Example of encrypting the environment variable API_TOKEN=”abc123”:

$  travis-encrypt --env mandeep Travis-Encrypt /home/user/.travis.yml
Password:
Encrypted password added to /home/user/.travis.yml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

travis-encrypt-1.1.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

travis_encrypt-1.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

travis_encrypt-1.1.0-py2-none-any.whl (20.5 kB view details)

Uploaded Python 2

File details

Details for the file travis-encrypt-1.1.0.tar.gz.

File metadata

File hashes

Hashes for travis-encrypt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3ae647e81de272b1080a3167df012893e360c4e4f17965a6c834d3b411968593
MD5 13e0647565f3a0878582b7347562fa8e
BLAKE2b-256 f6e9e804b142b67cf4b6710f048fe476e90e1653a73c08b9765d281021318e79

See more details on using hashes here.

File details

Details for the file travis_encrypt-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for travis_encrypt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1efc20bace0ec95c4b4f5db3be57249b911b9063d8e8e91b47410b02344b43a5
MD5 f3694096fe5f31ea7e18969ec1dd7fed
BLAKE2b-256 b0e26e52a96375e9e4b08429bba34d0523611c011899e33f9a9dbad1f933d6df

See more details on using hashes here.

File details

Details for the file travis_encrypt-1.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for travis_encrypt-1.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 50b340df071971999fc84dc218e668d952f9c7b0764f765668e1293594844426
MD5 fd300ffe409ba8867a12f71b99f9b0ca
BLAKE2b-256 c37bc3f90f8cfaeafde8a52fe433343e1d2587b76438cc9849812c568c43ded8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page