From 11eac797a0f38c50465eae5ca8a54d6b28fda79f Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Fri, 28 Aug 2026 21:15:24 +0200 Subject: [PATCH] port: push-work must not configure the repository it runs in It set `git config --local credential.helper "store --file=$HOME/..."`, which PERSISTS in the repository. The repo is a bind mount the host also uses, so the host's git inherited `store --file=/sylph-home/port/.git-credentials` -- a path that exists only inside the container -- and every host push then failed with `unable to get credential storage lock: No such file or directory`. Same root as the EBUSY credential error, from the other side: a tool that configures a shared repository to suit itself breaks every other user of that repository. Now applied with `-c` to the single push invocation. Cleared the leaked setting from both checkouts by hand. Syplheed-Reborn had it too, from the RE container's copy of this script. Co-Authored-By: Claude Opus 5 --- docker/bin/push-work | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/bin/push-work b/docker/bin/push-work index 74ac8a28..5a1d13b3 100755 --- a/docker/bin/push-work +++ b/docker/bin/push-work @@ -49,8 +49,17 @@ if [ ! -s "$HOME/.git-credentials" ]; then exit 1 fi -# `store` reads the file we mounted; nothing is written back (it is read-only). -git config --local credential.helper "store --file=$HOME/.git-credentials" +# Applied to THIS COMMAND ONLY, via `-c`, never `git config --local`. +# +# Writing it to --local config persists it in the repository, and this repo is a +# bind mount the host also uses -- so the host's git inherited +# `store --file=/sylph-home/port/.git-credentials`, a path that exists only +# inside the container, and every host push then failed with +# `unable to get credential storage lock: No such file or directory`. +# +# A tool that configures a shared repository to suit itself breaks every other +# user of that repository. Keep it to the invocation. +CRED_HELPER="store --file=$HOME/.git-credentials" ahead=$(git rev-list --count "origin/$branch..$branch" 2>/dev/null || git rev-list --count HEAD) echo "push-work: $branch — $ahead commit(s) to publish" @@ -63,5 +72,5 @@ fi # --force-with-lease is deliberately NOT offered. If this is rejected as # non-fast-forward, someone else moved the branch: fetch and merge, do not # overwrite. -git push --set-upstream origin "$branch" +git -c "credential.helper=$CRED_HELPER" push --set-upstream origin "$branch" echo "push-work: pushed $branch"