GitSecret

Python wrapper for git-secret. 🔐🔐🔐

Pre-requisites

Install git secret

Install git secret using your favorite installation method.

Generate a gpg key

Generate a gpg and passphrase using your e-mail of choice.

gpg --full-generate-key

Using Git Secret

Initialization

from gitsecret import GitSecret

secret_repo = GitSecret("/path/to/repo")
secret_repo.create()

Adding & removing users

secret_repo.tell("my_email@email.com")
secret_repo.killperson("my_email@email.com")

# After removing a person, you need to hide the repo again. 
secret_repo.hide()

Adding, encrpyting, and decrypting files

PASSWORD = "mysecretpassword"

secret_repo.add("hello.txt")
secret_repo.hide()
secret_repo.reveal(PASSWORD)