git-secret - Store your private data inside a git repository.

git-secret - Store your private data inside a git repository.


test release-ci Homebrew Supporters


What is git-secret?

git-secret is a bash tool which stores private data inside a git repo. git-secret encrypts files with permitted users' public keys, allowing users you trust to access encrypted data using pgp and their secret keys.

With git-secret, changes to access rights are simplified, and private-public key issues are handled for you.

When someone's permission is revoked, secrets do not need to be changed with git-secret - just remove their key from the keychain using git secret removeperson [email protected], re-encrypt the files, and they won't be able to decrypt secrets anymore. If you think the user might have copied the secrets or keys when they had access, then you should also change the secrets.


git-secret terminal preview


git-secret supports brew, just type: brew install git-secret

It also supports apt and yum. You can also use make if you want to. See the installation section for the details.


git-secret relies on several external packages:

  • bash since 3.2.57 (it is hard to tell the correct patch release)
  • gawk since 4.0.2
  • git since
  • gpg since gnupg 1.4 to gnupg 2.X
  • sha256sum since 8.21 (on freebsd and MacOS shasum is used instead)


Do you want to help the project? Find an issue and send a PR. It is more than welcomed! See on how to do that.


In order to encrypt (git-secret hide -m) files only when modified, the path mappings file tracks sha256sum checksums of the files added (git-secret add) to git-secret's path mappings filesystem database. Although, the chances of encountering a sha collision are low, it is recommend that you pad files with random data for greater security. Or avoid using the -m option altogether. If your secret file holds more data than just a single password these precautions should not be necessary, but could be followed for greater security.

If you found any security related issues, please do not disclose it in public. Send an email to [email protected]


git-secret uses semver. See


Thanks to all the people and groups who package git-secret for easier install on particular OSes and distributions!

Packaging status

Here are some packagings of git-secret that we're aware of:

Such packages are considered 'downstream' because the git-secret code 'flows' from the git-secret repository to the various rpm/deb/dpkg/etc packages that are created for specific OSes and distributions.

We have also added notes specifically for packagers in


Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]



Thanks to all our backers!



This project exists thanks to all the people who contribute. [Contribute].


MIT. See for details.


Special thanks to Elio Qoshi from ura for the awesome logo.

Download Source Code

Download ZIP
Apr 7, 2022