git-secret is a Bash utility for storing encrypted files inside Git repositories. It uses GnuPG to protect sensitive information such as credentials, configuration files and private keys, while allowing authorised collaborators to decrypt the content.
The application manages a repository-specific collection of public keys. Files are encrypted for the people listed in that collection, allowing projects to share protected information alongside ordinary source code without committing plaintext secrets.
git-secret is designed for selective encryption rather than protecting an entire repository. Removing someone’s access prevents them from decrypting newly encrypted content with their old key, but cannot revoke knowledge of secrets or access to historical data they may already possess.
This is free and open source software.
Key Features
- Encrypt selected files within existing Git repositories using GnuPG.
- Use public-key encryption so multiple authorised users can access protected files.
- Initialise encrypted storage using the git secret init command.
- Register files for protection with git secret add.
- Encrypt registered files using git secret hide.
- Decrypt protected files using git secret reveal.
- Display decrypted content directly using git secret cat.
- Add collaborators to the repository keyring using git secret tell.
- Remove collaborators using git secret removeperson and re-encrypt protected content.
- Automatically exclude registered plaintext files from ordinary Git commits.
- Optionally delete plaintext files after encryption.
- Track file hashes to avoid unnecessarily re-encrypting unchanged content.
- List registered files and manage encryption settings from the command line.
- Support integration with pre-commit hooks and automated workflows.
- Uses standard Git and GnuPG utilities rather than requiring a dedicated secrets server.
Website: sobolevn.me/git-secret
Support:
Developer: Nikita Sobolev and contributors
License: MIT License
Related Software
| Git Storage and Security Tools | |
|---|---|
| git-lfs | Git extension for versioning large files |
| Jujutsu | Powerful version control system for software projects |
| git-bug | Distributed offline-first bug tracker |
| Dash | Rich terminal UI for GitHub |
| git-secrets | Prevent adding secrets into git repositories |
| Commitizen | Create well-structured Git commit messages |
| git-repair | Repair various forms of damage to git repositories |
| git-secret | Bash tool which stores private data inside a git repo |
| git-annex | Manage files with git without checking the file contents into git |
| gitmoji-cli | Use gitmojis in Git commit messages |
| ghq | Organise local clones of remote repositories |
| git-crypt | Transparent file encryption in git |
| gita | Manage multiple git repos |
| git-chglog | CHANGELOG generator implemented in Go |
| cz-git | Commitizen adapter and command-line tool |
| gitpane | Multi-repo Git workspace dashboard |
| git-trim | Keep Git working directories clear of stale local branches |
| gfold | Keep track of multiple Git repositories |
| Garden | Command runner and multi-repo Git configuration tool |
| mani | Manage collections of Git repositories |
| GitSocial | Git-native cross-forge collaboration |
| git-fresh | Refresh Git working copies from the terminal |
| Forge Sparks | Get Git forges notifications |
| gohome | Git standup and activity reporting CLI |
| git-appraise | Distributed code review system for Git repositories |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.