git-signing-troubleshoot
Use when commits, tags, or pushes are blocked by GPG or SSH signing failures — including 1Password op-ssh-sign errors, failed to fill whole buffer, or misleading op whoami output, not when the main task is branch integration, PR handling, or secret-scan triage.
Version
1.0.0
Maturity
draft
Repository
agent-skills
License
GNU GPL v3
Skill metadata
SKILL.md
Git signing troubleshoot
Use this skill when local Git signing is the blocker and the job is to diagnose the trusted signing path safely, especially for 1Password-backed SSH signing, without bypassing GPG or SSH signing requirements.
Use this skill when
- A commit, tag, or push is blocked by a GPG or SSH signing failure.
- Git is configured for SSH signing and the error mentions
op-ssh-sign,failed to fill whole buffer, or another 1Password signing failure. op whoamisays the account is not signed in, but the 1Password app is open and the real question is whether signed Git operations still work.- You need to confirm the configured signing format or program path without swapping to an alternate signing route.
- The safest useful outcome is either a successful signed Git operation or a precise blocker that the user must clear in their trusted signing setup.
Do not use this skill when
- Signing already works and the real task is how to merge, push, or clean up the branch.
- The main blocker is PR creation, PR review, or remote checks rather than local signing.
- The push is blocked by secret scanning, not signing.
- The request is to bypass signing with
--no-gpg-sign, config overrides, or alternate credentials.
Routing boundary
| Situation | Use this skill? | Route instead |
|---|---|---|
| Local commit, tag, or push fails because the trusted signing path is broken or uncertain | Yes | - |
| Signing works and the next question is how to integrate the branch | No | finishing-a-development-branch |
| The work is PR creation, update, or check watching after the branch is already signed and pushed | No | github-cli-pr-workflow |
| The push is blocked by secret scanning or leaked-secret policy, not signing | No | secret-scan-triage |
Inputs to gather
Required before changing config
- The exact error from the real Git command that failed, preferably
git commit,git tag -s, orgit pushrather than a proxy diagnostic. - The current signing settings from
git config --get gpg.formatandgit config --get gpg.ssh.program. - Whether the configured signing program exists at that exact path.
- Whether the 1Password app is open and whether its SSH agent integration is enabled.
- Whether the failure happens on commit, tag, push, or all three.
Helpful if present
- The repository path, branch, and whether a previous signed operation succeeded recently.
- The exact configured signer binary path such as
op-ssh-sign. - Whether
op whoamidisagrees with the real Git command result. - Whether the failure is persistent or only occurs after the 1Password app locks.
Only investigate if encountered
- Safe key metadata such as title or item ID using fields-only
op item getqueries. - SSH agent environment details if the configured signer path exists but the app still cannot service requests.
- Whether a local config override is shadowing the intended global signing config.
First move
- Retry the real signed Git command first and treat that result as the source of truth.
- Read
gpg.formatandgpg.ssh.program, then confirm the configured signer exists at that exact path. - If the real command still fails, check whether the 1Password app is unlocked and its SSH agent integration is enabled before proposing any other action.
Workflow
- Start with the real signed Git operation. If
git commit,git tag, orgit pushsucceeds, stop: the signing path is working, even if a secondary probe such asop whoamilooks unhealthy. - If the real Git command fails, inspect
git config --get gpg.formatandgit config --get gpg.ssh.programso you know whether Git is actually using SSH signing and which program it expects. - Confirm that the configured signing program exists at the configured path. If the path is wrong or missing, restore the trusted configured signer path instead of substituting a different signing backend.
- If the error is
failed to fill whole bufferfromop-ssh-sign, treat it as a 1Password app-interop blocker. Ask the user to unlock 1Password, confirm the SSH agent is enabled in the app settings, and retry the same Git command. - Do not declare signing broken based on
op whoamialone. That command can report not-signed-in even when the 1Password app is delegating signed commits correctly. - If you need to inspect a 1Password SSH key item, request only non-secret fields such as
titleandidwithop item get "<item>" --fields title,id; never dump the full item payload. - If the trusted signer path is confirmed and the real Git command still fails, surface the exact blocker and stop for user action. The next step belongs to the user restoring or approving the trusted signing setup, not to the agent inventing an alternate route.
Outputs
- A verified answer about whether the real signed Git operation works.
- The exact trusted signing configuration in use and whether the configured signer path is valid.
- A precise external blocker when 1Password app approval, unlock state, or SSH agent setup is the real issue.
- A safe route-away decision when the problem is actually branch integration, PR handling, or secret-scan policy.
Guardrails
- Never suggest
--no-gpg-sign,git -c commit.gpgsign=false, credential-helper swaps, or alternate signing programs just to get a commit through. - Treat the real signed Git command as the source of truth; do not overrule it with
op whoami. - Treat
failed to fill whole bufferas a 1Password app or SSH-agent interop issue, not as a reason to change Git to an unsigned path. - Never fetch a full 1Password SSH key item payload just to confirm metadata.
- Stop and surface the blocker clearly when the trusted signing path needs user approval or repair.
Validation
- Retry the real signed Git command after any user-visible fix such as unlocking 1Password or enabling the SSH agent.
- Confirm
git config --get gpg.formatandgit config --get gpg.ssh.programmatch the intended trusted setup. - Confirm the configured signer path exists before blaming Git for a missing executable.
- If metadata inspection was needed, confirm only non-secret fields were requested.
- If the command still fails, record the exact error and hand back the blocker instead of proposing a bypass.
- Smoke test:
- should trigger: "My signed commit fails with
op-ssh-sign: failed to fill whole buffer; diagnose it without bypassing 1Password signing." - should not trigger: "The push was rejected because GitHub secret scanning found an AWS key in the diff." (→
secret-scan-triage)
- should trigger: "My signed commit fails with
Examples
- "A signed
git commitfailed even though 1Password is open; check the trusted SSH signing path and tell me whether the issue is Git config or 1Password interop." - "
op whoamisays not signed in, but I need to know whether my signed commit path is actually broken before I touch any config." - "Our repo uses SSH signing with 1Password and
op-ssh-sign; troubleshoot the failure safely and do not suggest disabling signing."
Reference files
references/op-ssh-sign-diagnostics.md— diagnostic command sequences, 1Password SSH agent states,op whoamifalse-negative pattern, and when to stopfinishing-a-development-branch— route here when signing works and the remaining question is branch integrationgithub-cli-pr-workflow— route here when the signed branch is ready and the remaining work is PR lifecyclesecret-scan-triage— route here when push rejection is caused by secret scanning rather than signingcopilot-instructions.md— source rules for never bypassing trusted signing, fields-only 1Password metadata checks, and treating real Git commands as the source of truth