Skip to content

Commit d05cd49

Browse files
DarkaMaulclaude
andauthored
Fix SSH commit signing in devcontainer when host uses 1Password (#25)
When the host configures `gpg.ssh.program` to use 1Password's `op-ssh-sign` binary, commit signing fails inside the container because that macOS-specific binary doesn't exist. DevContainers automatically forward SSH_AUTH_SOCK from the host, so the SSH agent (including 1Password's) is already available. By overriding `gpg.ssh.program` to `/usr/bin/ssh-keygen` in the container's local gitconfig (which is included after the host config), signing uses the standard ssh-keygen against the forwarded agent instead of the missing 1Password binary. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 85a0d4d commit d05cd49

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

post_install.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ def setup_global_gitignore():
199199
200200
[diff]
201201
colorMoved = default
202+
203+
[gpg "ssh"]
204+
program = /usr/bin/ssh-keygen
202205
"""
203206
local_gitconfig.write_text(local_config, encoding="utf-8")
204207
print(f"[post_install] Local git config created: {local_gitconfig}", file=sys.stderr)

0 commit comments

Comments
 (0)