Skip to content

Commit 3819277

Browse files
authored
fix(claude-code): install openssh-client for SSH-format commit signing (#111)
The shared `base` stage installs packages with --no-install-recommends, which drops git's Recommends on ssh-client (provided by openssh-client). The image therefore ships without ssh-keygen, so any container whose gitconfig uses SSH-format commit signing (gpg.format=ssh + commit.gpgsign=true, commonly copied in by VS Code's dev.containers.copyGitConfig) fails to commit: error: cannot run ssh-keygen: No such file or directory Add openssh-client to the base apt block so both the default and sandbox targets get ssh-keygen/ssh/ssh-add. It must live in base: the sandbox firewall blocks deb.debian.org, so it can't be apt-installed at runtime (same reasoning as chromium). openssh-client hard-depends on libfido2, so FIDO2 hardware keys (YubiKey sk-ssh-ed25519) sign too, even under --no-install-recommends. Closes #110
1 parent aa3c5e9 commit 3819277

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎claude-code/.devcontainer/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ ARG GIT_DELTA_VERSION=0.18.2
5555
# - git: version control
5656
# - jq: JSON processing (firewall script, onboarding patch)
5757
# - less: pager for git delta output
58+
# - openssh-client: provides ssh-keygen, needed for SSH-format commit signing
59+
# (gpg.format=ssh + commit.gpgsign=true, copied in via VS Code's
60+
# dev.containers.copyGitConfig); also restores ssh/ssh-add. git only
61+
# *Recommends* it, so --no-install-recommends drops it unless listed here.
62+
# Hard-depends on libfido2, so FIDO2 hardware keys (YubiKey sk-ssh-ed25519)
63+
# sign too. Must be in base: the sandbox firewall blocks deb.debian.org, so
64+
# it can't be added at runtime (same reasoning as chromium). See issue #110.
5865
# - sudo: privilege escalation for firewall setup
5966
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
6067
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
@@ -67,6 +74,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
6774
git \
6875
jq \
6976
less \
77+
openssh-client \
7078
sudo
7179

7280
# npm global directory with proper permissions for node user

‎claude-code/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Projects consume these pre-built images and control their own tool versions via
1717
|-------|------|-----|
1818
| OS | `node:24-trixie-slim` + system packages | Node is needed during the build (Playwright, npm globals) |
1919
| Shell | Fish, Starship, fzf | Built-in syntax highlighting, autosuggestions, completions |
20-
| Tools | git-delta, gh CLI, jq, nano, vim, wget, unzip, less, man-db, procps | Standard dev utilities |
20+
| Tools | git-delta, gh CLI, jq, nano, vim, wget, unzip, less, man-db, procps, openssh-client | Standard dev utilities (`openssh-client` provides `ssh`/`ssh-keygen` — enables SSH-format commit signing) |
2121
| Mise | The tool manager itself (not the tools) | Projects run `mise install` at container creation for their tool versions |
2222
| rtk, ralphex | Always-latest from GitHub Releases | Dev infrastructure (like Claude Code) — no version pinning needed in projects |
2323
| Claude Code | npm global install | npm avoids rate limiting that affects the native installer in parallel CI builds |

0 commit comments

Comments
 (0)