LinuxCommandLibrary

git-secret

Encrypt and store secrets in a Git repository

TLDR

Initialize git-secret

$ git secret init
copy
Add user by email
$ git secret tell [user@email.com]
copy
Add file to encrypt
$ git secret add [secret.txt]
copy
Encrypt secrets
$ git secret hide
copy
Decrypt secrets
$ git secret reveal
copy

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.

SEE ALSO

gpg(1), gh-secret(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community