Skip to content

Commit 226749f

Browse files
AbirAbbasclaude
andcommitted
fix: use gh CLI as git credential helper for private repo auth
Configures gh as git's credential helper at build time so all git HTTPS operations (clone, push, fetch) authenticate via GH_TOKEN automatically. Fixes private repo cloning failures on Railway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 13ebae7 commit 226749f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ ENV GIT_AUTHOR_NAME="SWE-AF" \
3030
GIT_COMMITTER_EMAIL="contact@agentfield.com"
3131

3232
RUN git config --global user.name "SWE-AF" && \
33-
git config --global user.email "contact@agentfield.com"
33+
git config --global user.email "contact@agentfield.com" && \
34+
# Use gh CLI as git credential helper — when GH_TOKEN env var is set at
35+
# runtime, all git HTTPS operations (clone, push, fetch) against GitHub
36+
# authenticate automatically without URL rewriting.
37+
gh auth setup-git
3438

3539
# Install uv for fast package installation
3640
RUN pip install --no-cache-dir uv

0 commit comments

Comments
 (0)