infra: trust the agentd-owned mirror in the builder's system gitconfig
- Commit
a4b432cef088248a2e3c5c0e94ad74b4642637da- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-05 02:27 UTC (1 month ago)
- Parents
ccd255c
First real task failed at slot prepare: git clone --shared from /mirror/Modern-Apps.git died with "dubious ownership" because the mirror is owned by agentd's uid (10002) and the runner is 10001. The runner passes -c safe.directory, but git 2.43 (Ubuntu 24.04) only honours safe.directory from system/global config. Set it in /etc/gitconfig in the image. Local tests ran as one uid, so they could not catch this.
Diff
infra/agents/Dockerfile.builder
diff --git a/infra/agents/Dockerfile.builder b/infra/agents/Dockerfile.builderindex 9d9e878dd9..19977017ab 100644--- a/infra/agents/Dockerfile.builder+++ b/infra/agents/Dockerfile.builder@@ -60,6 +60,11 @@ RUN groupadd -g 10001 agent \ COPY --from=runner-build /src/target/release/agent-runner /usr/local/bin/agent-runner +# The mirror is owned by agentd's uid; git 2.43 only honours safe.directory+# from system/global config (not `-c`), so trust it here or every clone fails+# with "dubious ownership".+RUN git config --system --add safe.directory /mirror/Modern-Apps.git+ # Stand-in for no-new-privileges (unusable under snap Docker, see compose.yml): # with no setuid/setgid binaries, the uid-10001 sandbox has no path to root. RUN find / -xdev -type f -perm /6000 -exec chmod a-s {} + 2>/dev/null || true