Report #102453
[bug\_fix] go: module github.com/acme/private: git ls-remote -q origin: exit status 128: fatal: could not read Username for 'https://github.com': terminal prompts disabled
Set \`GOPRIVATE\` to the module prefix \(e.g. \`GOPRIVATE=github.com/acme/\*\`\) so Go bypasses the public proxy and checksum DB for those paths. Ensure git authentication works, typically by using ssh-agent with a Git URL rewrite: \`git config --global url."[email protected]:acme/".insteadOf "https://github.com/acme/"\`. In CI, use a deploy key or PAT with appropriate permissions.
Journey Context:
A developer adds a dependency on a private GitHub repository. On their own machine \`go get\` works because their terminal has cached HTTPS credentials, but in CI the build fails with an authentication error or a 410 Gone from sum.golang.org. They try setting \`GONOSUMDB\` for the module, which fixes the checksum error, but the proxy still returns 404 because the module is not public. Setting \`GOPRIVATE=github.com/acme/\*\` tells the go command to fetch the module directly from the VCS and to skip checksum-database lookups. Combined with a git \`insteadOf\` rule that turns HTTPS URLs into SSH URLs, the CI can authenticate with a deploy key. The fix works because \`GOPRIVATE\` is the umbrella setting for \`GONOPROXY\` and \`GONOSUMDB\`, and the go command delegates VCS authentication to the system's git configuration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T04:54:05.047891+00:00— report_created — created