Skip to main content
header.png

travis coverage 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
    --env-file PATH         Path for a .env file containing variables to encrypt
    --private               Use the travis-ci.com API endpoint for private repositories
    --token TEXT            Authenticate the API request with a travis-ci token.

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

Example of using a .env file:

$  travis-encrypt --env-file /home/user/my.env mandeep Travis-Encrypt /home/user/.travis.yml
Encrypted variables from /home/user/my.env added to /home/user/.travis.yml

Metadata

Release files for travis-encrypt 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for travis-encrypt 1.4.0
File Size Uploaded
travis-encrypt-1.4.0.tar.gz 7.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for travis-encrypt 1.4.0
File Interpreter ABI Platform
travis_encrypt-1.4.0-py3-none-any.whl Python 3 none any Details
travis_encrypt-1.4.0-py2-none-any.whl Python 2 none any Details

Total release size: 26.0 kB

Release files / travis-encrypt-1.4.0.tar.gz

Download URL travis-encrypt-1.4.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5de1caa10954cbe031ef17e2b542fbf838f20f041eb9d0056a31c5b922ddea1
BLAKE2b-256 checksum
How to use checksums
94ba452a4ee6ef0a5ae2bbee3cbc8ae5f58bb0ad02c3e809d69de01199e7c696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.15

Release files / travis_encrypt-1.4.0-py3-none-any.whl

Download URL travis_encrypt-1.4.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc57c657818cfcfb11280067ff0c04492777412dfa2140f3302d03e181c5e373
BLAKE2b-256 checksum
How to use checksums
6aba2cf100dd588af8e1b09267a6b4132adc8a43d69ecc21c33c313052077bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.6

Release files / travis_encrypt-1.4.0-py2-none-any.whl

Download URL travis_encrypt-1.4.0-py2-none-any.whl
Size 9.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
292d20337e64c7a13f5397ee336aa4dadf0d11251fca68c57613d0c0032592ed
BLAKE2b-256 checksum
How to use checksums
7bf6ca64e5acf0251f1c25d1e5caed28df2c37c0b8ac63aed437faaccd446f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.15

Release history Release notifications | RSS feed

This release

1.4.0 This release

3 release files

1.3.1

3 release files

1.3.0

3 release files

1.2.3

3 release files

1.2.2

3 release files

1.2.1

3 release files

1.2.0

3 release files

1.1.2

3 release files

1.1.1

3 release files

1.1.0

3 release files

1.0.0

3 release files

0.9.1

3 release files

0.9.0

3 release files

0.8.0

1 release file

0.7.5

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page