This project is based on age. I'm in no way affiliated with the original project.
A big shoutout to Filippo Valsorda for creating age
and making it available to the public.
See INSTALL.md.
git age install
This will add the git-age
clean and smudge filters to your global git config.
git age init
# or if you want to add some comment to the generated key
git age init -c "My comment"
Remarks: The repository has to be in a clean state i.e. no changes files.
Alice wants to share the secrets stored in her Git repository with Bob.
- Bob installs
git-age
on his machine and configures his global git config
git age install
- Bob generates a new key pair
git age gen-key
# or if you want to add some comment to the generated key
git age gen-key -c "My comment"
the generated private key will be stored automatically in your keys.txt
- Bob sends his public key to Alice
- Alice adds Bob's public key to her repository
git age add-recipient <public key>
# or if you want to add some comment to the added key
git age add-recipient -c "My comment" <public key>
git age add-recipient
will:
- add the public key to the repository (
.agerecipients
file) - re-encrypt all files with the new set of recipients
- commit the changes
As soon as Alice pushed the changes to the remote repository, Bob can pull the changes and decrypt the files.
Set the diff.age.textconv
git config to cat
to see plain text diffs of encrypted files.
git config --global diff.age.textconv cat
For now git-age
is configured either via environment variables or CLI flags.
The most interesting part is where it reads and writes the private keys from.
This can be configured via the GIT_AGE_KEYS
environment variable or the --keys
flag.
By default git-age
will store the private keys in $XDG_CONFIG_HOME/git-age/keys.txt
.
Platform | Config path |
---|---|
Linux | $XDG_CONFIG_HOME/git-age/keys.txt i.e. $HOME/.config/git-age.keys.txt |
macOS | $HOME/Library/Application Support/git-age/keys.txt |
Windows | %LOCALAPPDATA%\git-age\keys.txt |
- git-crypt - based on GPG
- git-private - not a Git clean/smudge filter but encrypts/decrypts on demand
golangci-lint
husky
goimports
gofumpt
asciidoctor
- optionally:
goreleaser
- optionally:
dlv
Ensure golangci-lint
and other checks are executed before commit.
go install github.com/go-courier/husky/cmd/husky@latest
husky init