Fix conflicting --global/--file flags in entrypoint git config #12

Merged
jknapp merged 1 commits from fix/entrypoint-gitconfig-flags into main 2026-07-27 14:16:17 +00:00
Owner

git config rejects --global and --file passed together:

error: only one config file at a time

So the credential helper and user.name/user.email were never written. Confirmed in a running container: /home/claude/.gitconfig does not exist, meaning sandboxes had no git identity and no HTTPS token helper.

This drops --global and keeps --file /home/claude/.gitconfig at container/entrypoint.sh:123,129,132. --file is the correct one to keep: 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 on line 134 already assumes the --file path.

Verified bash -n passes and that git config --file <path> user.name writes and reads back correctly.

Requires an image rebuild (docker build -t triple-c-sandbox ./container) and container recreate to take effect.

🤖 Generated with Claude Code

`git config` rejects `--global` and `--file` passed together: ``` error: only one config file at a time ``` So the credential helper and `user.name`/`user.email` were never written. Confirmed in a running container: `/home/claude/.gitconfig` does not exist, meaning sandboxes had no git identity and no HTTPS token helper. This drops `--global` and keeps `--file /home/claude/.gitconfig` at `container/entrypoint.sh:123,129,132`. `--file` is the correct one to keep: 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` on line 134 already assumes the `--file` path. Verified `bash -n` passes and that `git config --file <path> user.name` writes and reads back correctly. Requires an image rebuild (`docker build -t triple-c-sandbox ./container`) and container recreate to take effect. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-07-27 13:07:50 +00:00
Fix conflicting --global/--file flags in entrypoint git config
Build Container / build-container (pull_request) Successful in 10m15s
7c39e3cf11
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) <noreply@anthropic.com>
jknapp merged commit 401e28a658 into main 2026-07-27 14:16:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CyberCoveLLC/Triple-C#12