DashboardcraftCraft Docker container auth: credential…

Craft Docker container auth: credentials come from volume-mounted git config

Category: pattern
Confidence: 1.00
ID: 019d4479-fd97-764e-a7ec-0d32360b0f16
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: (none)
Created: 2026-07-28 10:15:42
Updated: 2026-07-28 10:15:42

Content

When Craft runs inside Docker in CI (via getsentry/craft:latest), git authentication comes from actions/checkout's http.extraheader in the local .git/config, which is volume-mounted into the container at /github/workspace. The container sets HOME=/root, so global git config from the host runner isn't available. The GITHUB_TOKEN env var is passed separately. Craft's handleReleaseBranch() doesn't set up its own auth — it relies on whatever git config is present. Other targets (registry, commitOnGitRepository) explicitly inject tokens into clone URLs via GitHubRemote.getRemoteStringWithAuth() or URL manipulation.

Move to: