Re-encrypt for new recipients
Update the file's recipients to match .sops.yaml and re-encrypt the data key for them, without decrypting the file by hand.
sops updatekeys secrets.yaml
- tool
- sops4 commands
More sops commands
-
sops exec-env secrets.enc.yaml 'terraform apply'Pass decrypted secrets as env variables to one command; nothing is written to disk.
-
sops --set '["db"]["password"] "s3cr3t"' secrets.enc.yamlSet one nested key without opening an editor; handy for scripted secret rotation.
-
SOPS_AGE_RECIPIENTS=age1<id> sops -e -i secrets.yamlEncrypt only the values in place; keys stay readable, so diffs are still easy to review.