From d05cd49ea293a416b4be41d4a01f8fe6756a7b76 Mon Sep 17 00:00:00 2001 From: dm Date: Fri, 6 Mar 2026 01:10:00 +0100 Subject: [PATCH] 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) --- post_install.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/post_install.py b/post_install.py index 31a1e02..7309fb5 100644 --- a/post_install.py +++ b/post_install.py @@ -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)