From b6e4500233f354c01091acab7d118f0652a7ec0e Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Sun, 15 Nov 2026 12:33:24 +0100 Subject: [PATCH] Fix SSH key creation as a uid without passwd entry (ssh-keygen, ssh-keyscan, ssh-add wrappers) Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 7 +++++++ Dockerfile | 5 ++++- web/src/whatsnew.ts | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b09120..d8c832d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/); until 1.0, minor versions may contain breaking changes. +## [Unreleased] + +### Fixed + +- Creating an SSH key failed with "No user exists for uid 99": `ssh-keygen`, `ssh-keyscan` and + `ssh-add` get the same passwd workaround as `ssh`. + ## [v202611-00034] – 2026-11-15 ### Fixed diff --git a/Dockerfile b/Dockerfile index f4227db..b4cb803 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,10 +98,13 @@ COPY --from=dockercli /docker /usr/local/bin/docker COPY server/ghidra /app/ghidra # git for agent shells: commits get the co-author trailer of the model (server.commit_trailer). COPY --chmod=755 docker/git-coauthor /usr/local/lib/codecraft/bin/git -# ssh/scp/sftp also work when the container runs as a uid without passwd entry. +# ssh, scp, sftp and the ssh-* tools (the server creates keys with ssh-keygen) also work when the container runs as a uid without passwd entry. COPY --chmod=755 docker/ssh-nss /usr/local/bin/ssh COPY --chmod=755 docker/ssh-nss /usr/local/bin/scp COPY --chmod=755 docker/ssh-nss /usr/local/bin/sftp +COPY --chmod=755 docker/ssh-nss /usr/local/bin/ssh-keygen +COPY --chmod=755 docker/ssh-nss /usr/local/bin/ssh-keyscan +COPY --chmod=755 docker/ssh-nss /usr/local/bin/ssh-add COPY server/resources /app/resources # The agent's home lives on the data volume: tools it installs in user space # (pip --user, pipx, rustup, npm -g, downloaded binaries) survive rebuilds. diff --git a/web/src/whatsnew.ts b/web/src/whatsnew.ts index 16fb155..772be28 100644 --- a/web/src/whatsnew.ts +++ b/web/src/whatsnew.ts @@ -3,6 +3,10 @@ * under "unreleased"; scripts/release.sh renames the key to the release version. */ export const WHATS_NEW: Record = { + unreleased: { + en: ["Creating SSH keys works in the container now (fixes \"No user exists for uid\")"], + de: ["SSH-Schlüssel lassen sich im Container jetzt erzeugen (behebt \"No user exists for uid\")"], + }, "202611-00034": { en: ["ssh/scp/sftp now work in the container (fixes \"No user exists for uid\")"], de: ["ssh/scp/sftp funktionieren jetzt im Container (behebt \"No user exists for uid\")"],