-
Notifications
You must be signed in to change notification settings - Fork 0
Prefer GPG(GnuPG) rather than SSH key to sign commits #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7392823
WIP
kachick 154ef4d
Merge branch 'main' into gpg-commit-sign
kachick 266dc37
Update config
kachick 5e61377
Update PGP
kachick e5bb1f6
Ignore backup files from git;
kachick 7cd24e1
Fix filename
kachick 8abb824
Test commit sign with empty commit
kachick 6db36d4
Test commit sign with empty commit
kachick a538be9
Add gpg-agent workaround for macos
kachick 6887001
Fix nix syntax
kachick cbed09b
macOS is Werther's Original
kachick a384802
Add an empty commit
kachick d22a8fe
Prefer subkey
kachick a6d5ba6
Add note and update new subkey
kachick 16d98d8
Improve note
kachick 4fe8c7e
Keep passphrase cache longtime
kachick ab1bee6
Prefer pinentry-tty rather than default gtk2
kachick 1ea1919
Test commit sign with empty commit
kachick f225ea4
Add an empty commit
kachick 9cf5be1
Add how to get pubkey in global
kachick 660a767
Prefer nix syntax sugar
kachick 1b5dee7
Sync same gpg-agent config with macOS
kachick 03d7f9a
Add comment for why GPG
kachick 9ea8824
Add an empty commit
kachick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,3 +13,5 @@ tmp/ | |
| .DS_Store | ||
|
|
||
| winget-pkgs-*-raw.json | ||
|
|
||
| *.bak | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { config, ... }: | ||
|
|
||
| { | ||
| # https://github.com/nix-community/home-manager/blob/master/modules/services/gpg-agent.nix | ||
| services.gpg-agent.enable = true; | ||
|
|
||
| # https://github.com/nix-community/home-manager/blob/master/modules/programs/gpg.nix | ||
| programs.gpg = { | ||
| enable = true; | ||
|
|
||
| # How to backup the private key? | ||
| # `gpg --export-secret-keys --armor > gpg-private.keys.bak` | ||
|
|
||
| # Preferring XDG_DATA_HOME rather than XDG_CONFIG_HOME from following examples | ||
| # - https://wiki.archlinux.org/title/XDG_Base_Directory | ||
| # - https://github.com/nix-community/home-manager/blob/5171f5ef654425e09d9c2100f856d887da595437/modules/programs/gpg.nix#L192 | ||
| homedir = "${config.xdg.dataHome}/gnupg"; | ||
|
|
||
| # Ed448 in GitHub is not yet supported - https://github.com/orgs/community/discussions/45937 | ||
| settings = { | ||
| # https://unix.stackexchange.com/questions/339077/set-default-key-in-gpg-for-signing | ||
| default-key = "EF6E574D040AE2A5"; | ||
|
|
||
| personal-digest-preferences = "SHA512"; | ||
| }; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| ./bash.nix | ||
| ./zsh.nix | ||
| ./fish.nix | ||
| ./gpg.nix | ||
| ./ssh.nix | ||
| ./git.nix | ||
| ./zellij.nix | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,9 @@ | |
| lazygit | ||
| gh | ||
|
|
||
| # GPG | ||
| gnupg | ||
|
|
||
| dprint | ||
| shellcheck | ||
| shfmt | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.