From 85ab27d2414798fb3c372af98fae2872b579c96f Mon Sep 17 00:00:00 2001 From: Adam French Date: Mon, 21 Sep 2026 15:37:27 +0100 Subject: [PATCH] Fix silverbullet-git push failing with "No user exists for uid 1000" The sidecar runs as uid 1000 so its commits match the vault's ownership on the host, but alpine/git has no passwd entry for that uid. ssh resolves the calling uid before it does anything else and aborts when it cannot, so every push failed at "No user exists for uid 1000" without reaching the deploy key. Mount a minimal passwd file that defines the uid. SilverBullet's own entrypoint creates the user at boot for the same reason; this container has no entrypoint of its own, so the entry is supplied as a file. Verified on the Pi: with the mount, ssh authenticates as the silverbullet-git deploy key; without it, the uid error reproduces. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ --- docker-compose.yml | 2 ++ silverbullet/passwd | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 silverbullet/passwd diff --git a/docker-compose.yml b/docker-compose.yml index ba30b21..fc02e7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -388,6 +388,8 @@ services: - ${OBSIDIAN_DIR}:/space - ./silverbullet/git-sync.sh:/git-sync.sh:ro - ./silverbullet/ssh:/ssh:ro + # ssh will not run for a uid with no passwd entry; see the file's comment. + - ./silverbullet/passwd:/etc/passwd:ro # FastAPI side-service, proxied at /py/ with the prefix stripped by nginx. # ROOT_PATH=/py tells FastAPI it is mounted under a prefix so the generated diff --git a/silverbullet/passwd b/silverbullet/passwd new file mode 100644 index 0000000..63f228e --- /dev/null +++ b/silverbullet/passwd @@ -0,0 +1,11 @@ +# Minimal /etc/passwd for the silverbullet-git container. +# +# The container runs as uid 1000 (matching the vault's owner on the host) so its +# commits don't leave root-owned objects in .git. But alpine/git has no passwd +# entry for that uid, and ssh refuses to start for a uid it cannot resolve -- +# it fails with "No user exists for uid 1000" before it ever tries the key, so +# every push fails. Mounting this file over /etc/passwd gives ssh something to +# resolve. SilverBullet's own entrypoint solves the same problem by creating the +# user at boot; this container has no entrypoint of its own to do that in. +root:x:0:0:root:/root:/bin/sh +sbgit:x:1000:1000:sbgit:/tmp:/bin/sh