prskr/git-age
prskr/git-age has 27 GitHub stars and 3 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 00:02 UTC. Last push 2026-11-12.
实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
This project is based on age. I'm in no way affiliated with the original project.
开发工具README.md
原文git-age
Disclaimer
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.
Introduction
Install
See INSTALL.md.
Getting started
Install hooks in global git config
git age install
This will add the git-age clean and smudge filters to your global git config.
Init repository to share secret files
git age init
# or if you want to add some comment to the generated key
git age init -c "My comment"
Add another user to an already prepared repository
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-ageon 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 (
.agerecipientsfile) - 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.
Tips and tricks
Diff of text 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
Configuration
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 |
Alternatives
- git-crypt - based on GPG
- git-private - not a Git clean/smudge filter but encrypts/decrypts on demand
Development
Required Tools
asciidoctor- optionally:
goreleaser - optionally:
dlv
Install husky
Ensure golangci-lint and other checks are executed before commit.
go tool husky init