GIT-SECRET-HIDE(1)
β¨ GIT-SECRET-HIDE(1) β¨
okay so bestie, welcome to git-secret-hide π this is the one that does the hiding, from the git-secret family (version 0.5.0-alpha2, she's a lil alpha but she's iconic).
π NAME π
git-secret-hide β encrypts all added files with repo keyring. that's it, that's the girl π
π¦ SYNOPSIS π¦
git secret hide [-c] [-F] [-P] [-v] [-d] [-m]
πΈ DESCRIPTION πΈ
so git-secret-hide writes an encrypted version of each file that got added by the git-secret-add command. no cap.
then literally anyone you've enabled via git secret tell can decrypt those files. slay π«Ά
under the hood? git-secret is using the keyring of public keys sitting in .gitsecret/keys to encrypt your files, and the encrypted versions are typically called filename.txt.secret. cute, right?
later, permitted users can use their secret key (typically from their home directory) to decrypt files. that's the whole vibe π
β οΈ ok this next part is IMPORTANT so like, read it, fr fr:
it is recommended to encrypt (or re-encrypt) ALL the files in a git-secret repo every single time git secret hide is run. otherwise the keyring (the one stored in .gitsecret/keys/*.gpg) may have changed since the last time the files were encrypted, and itΒ΄s possible to create a state where the users in the output of git secret whoknows may not be able to decrypt the some files in the repo, or may be able decrypt files theyΒ΄re not supposed to be able to. π that's a whole mess, we do not want.
in other words, unless you re-encrypt all the files in a repo each time you hide any, itΒ΄s possible to make it so some files can no longer be decrypted by users who should be (and would appear) able to decrypt them, and vice-versa. π« the way that access control can just *dissolve*β¦
if you know what you are doing and wish to encrypt or re-encrypt only a subset of the files even after reading the above paragraphs, you can use the -F or -m options. here's the tea:
-Fforcesgit secret hideto skip any hidden files where the unencrypted versions arenΒ΄t present.-mskips any hidden files that have not be been modified since the last time they were encrypted.
β¨ OPTIONS β¨
-vβ verbose, shows extra information. she's chatty and we love that π¬-cβ deletes encrypted files before creating new ones. out with the old, in with the new π-Fβ forces hide to continue if a file to encrypt is missing. no meltdowns, we keep it moving π-Pβ preserve permissions of unencrypted file in encrypted file. matchy matchy π-dβ deletes unencrypted files after encryption. bye bestie π (dramatic but intentional)-mβ encrypt files only when modified. if it didn't change, we're not touching it β-hβ shows help. the classic, the icon, the safe word π
π ENV VARIABLES π
SECRETS_GPG_COMMANDβ changes the defaultgpgcommand to anything else. go off, use a different tool πSECRETS_GPG_ARMORβ is a boolean to enable--armormode https://www.gnupg.org/gph/en/manual/r1290.html to store secrets in text format over binary. text mode girlies rise π§SECRETS_DIRβ changes the default.gitsecret/folder to another name, as documented at git-secret(7) https://git-secret.io/SECRETS_EXTENSIONβ changes the default.secretfile extension. rename your babies however you want πSECRETS_VERBOSEβ changes the output verbosity, as documented at git-secret(7) https://git-secret.io/SECRETS_PINENTRYβ changes thegpg --pinentrymode https://github.com/gpg/pinentry as documented at git-secret(7) https://git-secret.io/
π MANUAL π
run man git-secret-hide to see this document. yes, the thing you are literally reading rn. meta πͺβ¨
π SEE ALSO π
- git-secret-init(1) https://git-secret.io/git-secret-init
- git-secret-tell(1) https://git-secret.io/git-secret-tell
- git-secret-add(1) https://git-secret.io/git-secret-add
- git-secret-reveal(1) https://git-secret.io/git-secret-reveal
- git-secret-cat(1) https://git-secret.io/git-secret-cat
sobolevn wrote this in April 2022, and it's part of the git-secret 0.5.0-alpha2 era π that's the whole page bestie, now go encrypt something responsibly π«Άβ¨π
π¦ where this page comes from
- debian bookworm: git-secret 0.5.0-1 Β· MIT
- debian trixie: git-secret 0.5.0-1 Β· MIT
- fedora 43: git-secret 0.5.0-9.fc43 Β· MIT
- fedora 44: git-secret 0.5.0-10.fc44 Β· MIT
- ubuntu noble: git-secret 0.5.0-1 Β· MIT
- ubuntu questing: git-secret 0.5.0-1
- ubuntu resolute: git-secret 0.5.0-1build1 Β· MIT
- ubuntu stonking: git-secret 0.5.0-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms