From 7c39e3cf110585c810889d8ce971415e5efdb733 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Mon, 27 Jul 2026 06:05:06 -0700 Subject: [PATCH] Fix conflicting --global/--file flags in entrypoint git config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git rejects `--global` and `--file` together ("error: only one config file at a time"), so the credential helper and user.name/user.email were never written — /home/claude/.gitconfig was left nonexistent and containers had no git identity or HTTPS token helper. Drop `--global` and keep `--file /home/claude/.gitconfig`, which is the intended target: the entrypoint runs as root at that point, so `--global` would have resolved to /root/.gitconfig, and the existing `chown claude:claude /home/claude/.gitconfig` already assumes the --file path. Co-Authored-By: Claude Opus 5 (1M context) --- container/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/entrypoint.sh b/container/entrypoint.sh index 4bcf08f..11a4056 100644 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -120,16 +120,16 @@ if [ -n "$GIT_TOKEN" ]; then echo "https://oauth2:${GIT_TOKEN}@github.com" >> "$CRED_FILE" echo "https://oauth2:${GIT_TOKEN}@gitlab.com" >> "$CRED_FILE" echo "https://oauth2:${GIT_TOKEN}@bitbucket.org" >> "$CRED_FILE" - git config --global --file /home/claude/.gitconfig credential.helper "store --file=$CRED_FILE" + git config --file /home/claude/.gitconfig credential.helper "store --file=$CRED_FILE" unset GIT_TOKEN fi # ── Git user config ────────────────────────────────────────────────────────── if [ -n "$GIT_USER_NAME" ]; then - git config --global --file /home/claude/.gitconfig user.name "$GIT_USER_NAME" + git config --file /home/claude/.gitconfig user.name "$GIT_USER_NAME" fi if [ -n "$GIT_USER_EMAIL" ]; then - git config --global --file /home/claude/.gitconfig user.email "$GIT_USER_EMAIL" + git config --file /home/claude/.gitconfig user.email "$GIT_USER_EMAIL" fi chown claude:claude /home/claude/.gitconfig 2>/dev/null || true