Home > Git Crypt usage

Git Crypt usage

Use git-crypt with GPG keys.

Use git-crypt with GPG keys.

git-crypt init
git-crypt add-gpg-user 'me@example.com'

Create a .gitattributes. For example, excrypt all of the .env files:

*.env filter=git-crypt diff=git-crypt
git-crypt status
git commit -am 'add files'
git-crypt lock

Then cat secrets.env should be unreadable :)

Use git-crypt unlock to continue.