guettli
guettli

Reputation: 27806

Store secrets in Travis, not in github repo

I use this guide for ci, bumpversion, upload to pypi:

https://github.com/guettli/github-travis-bumpversion-pypi

I like it, except that the secret gets stored in the repo.

Example: https://github.com/guettli/reprec the file secret-files.tar.enc is in the git repo and it looks strange.

Open source lovers don't like unparsable binaries like this.

Is there a way to store the secret in travis instead of github?

Upvotes: 0

Views: 419

Answers (1)

ice1000
ice1000

Reputation: 6569

Yes. You can set your secret as an environment variable on Travis, and use it in your program. Others can only know "oh, this guy uses a environment variable called PASSWORD!" and they don't know what the value is.

Only you and Travis CI know.

See this doc: https://docs.travis-ci.com/user/environment-variables/

If you want to store a secret file, you can create a private github repo, and clone it with your github password stored in the env variables.

Upvotes: 3

Related Questions