-
cd repo; git-crypt init -
Add files which need to be encrypted to .gitattributes
echo "secretfile1.txt filter=git-crypt diff=git-crypt" >> .gitattributes
echo "secretfile2.txt filter=git-crypt diff=git-crypt" >> .gitattributes- Add
local.keyto .gitignore
echo local.key >> .gitignore- Commit .gitattributes and .gitignore
git add .gitattributes .gitignore
git commit -m "Config: git-crypt settings"- Encrypt repo using git-crypt & encrypt they key using GPG and your password
git-crypt init
git-crypt export-key local.key
gpg --symmetric --armor local.key
rm local.key
git add local.key.asc
git commit -m "Config: add symmetric encryption key"