LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sops

Encrypt secrets in structured config files

TLDR

Encrypt file
$ sops -e [secrets.yaml] > [secrets.enc.yaml]
copy
Decrypt file
$ sops -d [secrets.enc.yaml]
copy
Edit encrypted file
$ sops [secrets.enc.yaml]
copy
Encrypt with specific key
$ sops -e --age [age-public-key] [file.yaml]
copy
Rotate keys
$ sops -r [secrets.enc.yaml]
copy
Add KMS key
$ sops --add-kms [arn:aws:kms:...] [file.yaml]
copy

SYNOPSIS

sops [options] file

DESCRIPTION

sops (Secrets OPerationS) encrypts files while keeping their format intact. It encrypts values but leaves keys readable, making diffs and reviews practical.The tool supports multiple key sources including AWS KMS, GCP KMS, Azure Key Vault, age, and PGP.

PARAMETERS

-e, --encrypt

Encrypt file.
-d, --decrypt
Decrypt file.
-r, --rotate
Rotate data key.
-i, --in-place
Modify file in place.
--age key
Age public key.
--pgp key
PGP fingerprint.
--kms arn
AWS KMS key ARN.
--gcp-kms resource
GCP KMS key.
--azure-kv url
Azure Key Vault key.
--input-type type
Input format.
--output-type type
Output format.

CONFIGURATION

.sops.yaml

Project-level configuration defining default encryption keys and rules for matching files to specific key sets.
SOPS_AGE_KEY_FILE
Path to the age private key file for decryption (default: ~/.config/sops/age/keys.txt).
SOPS_AGE_KEY
Age private key provided directly as an environment variable.

INSTALL

sudo pacman -S sops
copy
sudo apk add sops
copy
sudo zypper install sops
copy
brew install sops
copy
nix profile install nixpkgs#sops
copy

CAVEATS

Requires key access for decryption. Multiple keys recommended for redundancy. Key rotation should be periodic. Some formats have limitations.

HISTORY

sops was created by Mozilla for managing secrets in configuration files. It emerged from needs at Mozilla and has been adopted widely for secrets management in GitOps workflows.

SEE ALSO

age(1), gpg(1), vault(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid