Git-crypt
From wikinotes
Encrypt select files within a git repo.
Designed for encrypting few/select files within a git repo, rather than the entire repo.
You may also be interested in encfs and vim-gnupg.
Documentation
official docs https://github.com/AGWA/git-crypt/wiki github https://github.com/AGWA/git-crypt
Tutorials
dev https://dev.to/heroku/how-to-manage-your-secrets-with-git-crypt-56ih
Install
sudo pacman -S git-crypt
Configuration
Repo Setup
# create repo mkdir myrepo cd myrepo git init git-crypt init# .gitattributes # specify files to encrypt *.rst filter=git-crypt diff=git-crypt# add GPG key to encrypt files with git-crypt add-gpg-user user@domain.com # email specified in gpgkey being used # export git-crypt's key so that you have a backup (?) git-crypt export-key ~/gitcryptkeyMigrating docs to new GPG keys
# haven't tried this yet, but it looks like it might be git-encrypt migrate-key
Usage
git crypt lock git crypt unlock git crypt status # show encrypted/non-encrypted status of files