Commit a285481
fix: seed .sandbox-gitconfig so git works in Claude Code sandboxes (#336)
Claude Code sets GIT_CONFIG_GLOBAL=/root/.sandbox-gitconfig when
IS_SANDBOX=1, but nothing creates the file. Every git command then
fails with "fatal: unknown error occurred while reading the
configuration files". Seed an empty .sandbox-gitconfig via
home_seed_files so it is created on the host and bind-mounted
read-write into the container.
This also sidesteps a secondary issue where the host's .gitconfig
(mounted read-only) can carry a broken credential.helper escape
(\!gh instead of !gh) -- with GIT_CONFIG_GLOBAL pointing to the
sandbox file, git no longer reads the host .gitconfig.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent aa03032 commit a285481
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
0 commit comments