git-secret
Encrypt and store secrets in a Git repository
TLDR
Initialize git-secret
$ git secret init
Add user by email$ git secret tell [user@email.com]
Add file to encrypt$ git secret add [secret.txt]
Encrypt secrets$ git secret hide
Decrypt secrets$ git secret reveal
SYNOPSIS
git secret command [options]
DESCRIPTION
git secret encrypts sensitive files for safe storage in Git repositories. Files are encrypted with GPG for specified recipients, allowing secrets to be version-controlled safely.
The tool manages encryption, decryption, and recipient lists. Encrypted files (`.secret`) are tracked by Git while the original plaintext files are automatically added to `.gitignore`.
PARAMETERS
init
Initialize git-secret in repo.tell EMAIL
Add GPG user.add FILE
Add file to secrets.hide
Encrypt secret files.reveal
Decrypt secret files.remove FILE
Remove file from secrets.list
List secret files.--help
Display help information.
CONFIGURATION
.gitsecret/
Directory storing git-secret configuration, key rings, and file mappings.
CAVEATS
Requires GPG. Recipients need GPG keys. Separate tool from gh secret.
HISTORY
git secret was created to solve the problem of storing secrets in git repositories, using GPG encryption to protect sensitive configuration.
