This guide shows how to securely manage git-crypt keys using Bitwarden by converting binary keys to Base64 text.
Export and Encode the Key
Export your git-crypt key and convert it to Base64:
| |
Store in Bitwarden
View and copy the Base64 content:
| |
In Bitwarden, create a Secure Note named “git-crypt key” and paste the content.
Retrieve and Unlock
Use Bitwarden CLI to retrieve, decode, and unlock:
| |
CI/CD Integration
For automated workflows, use the same commands in your pipeline:
| |
Best Practices
- Add
*-git-crypt-keyand*.b64to.gitignore - Never commit decoded key files
- Rotate keys periodically
- Limit Bitwarden access to authorized team members only