```bash git show COMMIT_HASH --show-signature --quiet ``` ``` commit COMMIT_HASH (HEAD -> main, origin/main, origin/HEAD) Good "git" signature for benjamin.loison@CENSORD.fr with ED25519 key SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8 Author: Benjamin <benjamin.loison@CENSORED.fr> Date: Wed Jun 17 18:47:45 2026 +0200
CENSORED ```
mention `benjamin_loison@benjamin-loison-framework` in *Good "git" signature for benjamin.loison@CENSORD.fr with ED25519 key SHA256* line?
Jun 25, 1:56pm
To make git show --show-signature display the comment (in your case, benjamin_loison@benjamin-loison-framework) from your ~/.ssh/allowed_signers file in the signature verification line, you need to ensure that:
The comment is properly associated with the key in allowed_signers.
Your current allowed_signers entry is correct:
The comment (benjamin_loison@benjamin-loison-framework) is already appended to the key.
Git uses the allowed_signers file for verification.
Git respects the allowed_signers file for signature verification, but the comment is not natively displayed in the output of git show --show-signature. The comment is only used for internal trust verification.
Why the Comment Doesn't Appear
Git's --show-signature output is hardcoded to show:
The signer's identity (from the signature itself, e.g., benjamin.loison@CENSORED.fr).
The key type (e.g., ED25519).
The key fingerprint (e.g., SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8).
It does not include the comment from allowed_signers in this line.
Workarounds
1. Use gpg or ssh-keygen to Verify the Key
You can manually verify the key and its comment using:
bash
ssh-keygen -F benjamin.loison@CENSORED.fr -l
or
bash
ssh-keygen -l -f ~/.ssh/allowed_signers
This will show the comment, but it won't integrate with git show --show-signature.
2. Custom Git Alias (Partial Solution)
Create a Git alias to append the comment to the output:
bash
git config --global alias.showsig '!f() { git show "$1" --show-signature --quiet | sed "s/Good \"git\" signature for \(.*\) with \(.*\) key \(.*\)/Good \"git\" signature for \1 with \2 key \3 (benjamin_loison@benjamin-loison-framework)/"; }; f'
Now, running:
bash
git showsig COMMIT_HASH
will append the comment to the output.
3. Patch Git (Advanced)
If you want the comment to appear natively, you would need to:
Modify Git's source code (specifically, the check_signature logic in signature.c).
Recompile Git.
This is not recommended for most users.
4. Use a Wrapper Script
Create a script (e.g., git-show-sig) that:
Runs git show --show-signature --quiet.
Parses the output and appends the comment from allowed_signers.