Merge pull request 'Fix conflicting --global/--file flags in entrypoint git config' (#12) from fix/entrypoint-gitconfig-flags into main
Build Container / build-container (push) Successful in 2m47s

This commit was merged in pull request #12.
This commit is contained in:
2026-07-27 14:16:17 +00:00
+3 -3
View File
@@ -120,16 +120,16 @@ if [ -n "$GIT_TOKEN" ]; then
echo "https://oauth2:${GIT_TOKEN}@github.com" >> "$CRED_FILE" echo "https://oauth2:${GIT_TOKEN}@github.com" >> "$CRED_FILE"
echo "https://oauth2:${GIT_TOKEN}@gitlab.com" >> "$CRED_FILE" echo "https://oauth2:${GIT_TOKEN}@gitlab.com" >> "$CRED_FILE"
echo "https://oauth2:${GIT_TOKEN}@bitbucket.org" >> "$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 unset GIT_TOKEN
fi fi
# ── Git user config ────────────────────────────────────────────────────────── # ── Git user config ──────────────────────────────────────────────────────────
if [ -n "$GIT_USER_NAME" ]; then 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 fi
if [ -n "$GIT_USER_EMAIL" ]; then 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 fi
chown claude:claude /home/claude/.gitconfig 2>/dev/null || true chown claude:claude /home/claude/.gitconfig 2>/dev/null || true