Git-crypt

From wikinotes
Revision as of 11:13, 10 April 2021 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Encrypt select files within a git repo.
Designed for encrypting select files within a git repo, rather than the entire repo.

You may also be interested in encfs and vim-gnupg.

Documentation

github https://github.com/AGWA/git-crypt

Install

sudo pacman -S git-crypt

Setup

# create repo
mkdir myrepo
cd myrepo
git init
git-crypt init

# specify files to encrypt within .gitattributes
*.rst filter=git-crypt diff=git-crypt

# add key
git-crypt add-gpg-user user@domain.com   # email specified in gpgkey being used

# export key
git-crypt export-key ~/gitcryptkey

Usage

git crypt lock
git crypt unlock