[FEATURE REQUEST] Support commit signing to work with GitHub Vigilant Mode
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 7 comments · opened Sep 16, 2025 · closed Jan 13, 2026
Feature Request
Add support for Git commit signing when Claude Code creates commits, respecting the user's existing commit signing configuration.
Current Behavior
When Claude Code creates commits, they are not signed even when the user has commit signing configured locally with:
commit.gpgsign = truein git config- GPG or SSH signing keys properly configured
- Signing working correctly for manual commits
Problem
Users with GitHub Vigilant Mode enabled see Claude's commits marked as "Unverified", which:
- Creates visual inconsistency in commit history
- Can trigger organizational compliance warnings
- Requires manual amendment of commits to add signatures
Many organizations require all commits to be signed as part of their security policies.
Proposed Solution
Claude Code should detect and respect the user's commit signing configuration:
- Check for signing configuration:
git config commit.gpgsigngit config user.signingkeygit config gpg.format(GPG vs SSH)
- When creating commits:
- If signing is configured, add appropriate signing flags
- For GPG:
git commit -S - For SSH: ensure
gpg.format=sshis respected
- Graceful fallback:
- If signing fails, warn the user but still create unsigned commit
Example Implementation
# Check if signing is enabled
if git config --get commit.gpgsign | grep -q true; then
# Use -S flag for signed commits
git commit -S -m "message"
else
# Standard commit without signing
git commit -m "message"
fi
7 Comments
Hey, this is a fantastic feature request. I ran into the same issue myself. Our org requires all commits to be signed, and having Claude's commits show up as "Unverified" on GitHub is a nuisance, especially with Vigilant Mode enabled. It's becoming a standard security practice, so native support for this would be a huge win.
While we wait for the official team to hopefully implement this, I think I found a decent workaround using a custom slash command. It's not perfect because you have to explicitly tell Claude to use it, but it saves you from having to manually amend every commit.
Here’s how you can set it up:
``
bash
``mkdir -p .claude/commands
.claude/commands/commit.mdand add the following content:``
markdown
``---
description: Creates a GPG/SSH signed git commit.
argument-hint: [commit message]
allowed-tools: Bash(git commit:*)
---
!git commit -S -m "$ARGUMENTS"
How this works:
/commitslash command that Claude can use.!git commit -S -m "$ARGUMENTS"line executes thegit commitcommand with the crucial-Sflag for signing. Whatever you type after/commitgets passed in as the message.gitand GPG/SSH agent setup, so it should just work if your manual signed commits are already working.How to use it:
Now, instead of asking Claude to "commit the changes," you can guide it to use your new command:
> Use the /commit command to create a signed commit with the message "feat: Add new user authentication flow"It's an extra step, but it gets the job done. You could even add an instruction to your project's
CLAUDE.mdfile to remind Claude to prefer using/commitfor creating commits.Hope this helps you out in the meantime!
You can sign a range of commits using
git rebase --exec, e.g.git rebase --exec 'git commit --amend --no-edit --no-verify --gpg-sign'.This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
keep open
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Upvote or comment on that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.