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