mirror of
https://github.com/trailofbits/claude-code-devcontainer
synced 2026-06-21 14:11:48 +00:00
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>
This commit is contained in:
@@ -199,6 +199,9 @@ node_modules/
|
||||
|
||||
[diff]
|
||||
colorMoved = default
|
||||
|
||||
[gpg "ssh"]
|
||||
program = /usr/bin/ssh-keygen
|
||||
"""
|
||||
local_gitconfig.write_text(local_config, encoding="utf-8")
|
||||
print(f"[post_install] Local git config created: {local_gitconfig}", file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user