Quick Start
Enable GitLocker on an existing Git repository with the free CLI and Personal Provider.
Enable GitLocker on an existing Git repository with the free CLI and Personal Provider.
This guide starts with the free CLI and the Personal Provider. No GitBraints account is required. SaaS key hosting and Grant are optional upgrades, not a prerequisite for encryption.
gitl is on your PATH:npm install -g gitlocker@latest gitl --versionOn Linux or macOS, a global install may need extra permissions unless your npm prefix points to a user directory; on Windows, run the command in PowerShell or Command Prompt.
cd /path/to/your/repo
At the repository root:
gitl init
GitLocker will:
.gitlocker/config.If you later want hosted keys, switch to the Server Provider and sign in to GitBraints. You do not need SaaS on the first gitl init.
Use gitl encrypt to choose files or directories that should become ciphertext in Git:
gitl encrypt "config/production.json" "secrets/**"
This is the user-facing repository encryption entry. It does not rewrite older Git history into ciphertext by default.
When git status shows changes, commit them:
git add -A git commit -m "Encrypt production config and secrets"
git add config/production.json secrets/api-key.env git commit -m "Update encrypted secrets" git push origin main
The remote stores ciphertext blobs. The Git host can still see paths, authors, and timestamps. It should not see readable contents of encrypted files.
git checkout main
After a successful checkout, editors see plaintext. GitLocker does not protect an already-checked-out working tree. Keep using OS permissions and Git hosting ACL for the machine and private repositories.
When you need hosted keys across machines or Grant-based fetch for collaborators, use the Server Provider:
/home/gitlocker or the team page.gitl login. Remove Git hosting access first when someone leaves.SaaS is not zero-knowledge. Revoke does not instantly wipe cached keys. Rotation does not rewrite Git history.
Done. Continue with the GitLocker overview for boundaries and the collaboration model.