Skip to main content

Encrypt passwords for use with Travis CI.

Project description

header.png

travis coverage dependencies 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.2.tar.gz (6.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.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

travis_encrypt-1.1.2-py2-none-any.whl (9.8 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: travis-encrypt-1.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for travis-encrypt-1.1.2.tar.gz
Algorithm Hash digest
SHA256 0eaec20d99fb7a6051dae39195a51d81c365097675ad921d6c6381eabf014ce5
MD5 7cd91db85d0bb09c8069c53698f18047
BLAKE2b-256 0bc7a85f73bef56a78ce4782593d9e57c439ade1fcb321274dee2af31495ee0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: travis_encrypt-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for travis_encrypt-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e3aa10010e8c31f115ee25db64ca645bd2a0cdeb47fed1731468821c17b65d
MD5 695fd07a8c1a9a72ba0655c2fafe2a94
BLAKE2b-256 fd548cdfb64b8a554ab0d160a773a02b9202cd56a2a4fade7260734b19765a3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: travis_encrypt-1.1.2-py2-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for travis_encrypt-1.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 b73f691b3b5a2b783f909cd7892d1e34be0884d2280b62da0300cb2e6d6f1467
MD5 97132473516f05ccd8219000201901bd
BLAKE2b-256 1841bd4107ccee7e7046faa44b4f9ecbd70f837b7b9aa3de9673db587b62c685

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