Git Clients

git-secret – encrypt sensitive files in Git repositories

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-lfsGit extension for versioning large files
JujutsuPowerful version control system for software projects
git-bugDistributed offline-first bug tracker
DashRich terminal UI for GitHub
git-secretsPrevent adding secrets into git repositories
CommitizenCreate well-structured Git commit messages
git-repairRepair various forms of damage to git repositories
git-secretBash tool which stores private data inside a git repo
git-annexManage files with git without checking the file contents into git
gitmoji-cliUse gitmojis in Git commit messages
ghqOrganise local clones of remote repositories
git-cryptTransparent file encryption in git
gitaManage multiple git repos
git-chglogCHANGELOG generator implemented in Go
cz-gitCommitizen adapter and command-line tool
gitpaneMulti-repo Git workspace dashboard
git-trimKeep Git working directories clear of stale local branches
gfoldKeep track of multiple Git repositories
GardenCommand runner and multi-repo Git configuration tool
maniManage collections of Git repositories
GitSocialGit-native cross-forge collaboration
git-freshRefresh Git working copies from the terminal
Forge SparksGet Git forges notifications
gohomeGit standup and activity reporting CLI
git-appraiseDistributed code review system for Git repositories

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted