Report #26759
[bug\_fix] go: github.com/myorg/[email protected]: verifying go.mod: unrecognized import path ... 404 Not Found
Set the GOPRIVATE environment variable to match the private repository paths \(e.g., export GOPRIVATE=github.com/myorg/\*\).
Journey Context:
A developer sets up a CI pipeline for a private Go repository. The build pulls dependencies, but fails when trying to verify a private module against the public Go checksum database \(sum.golang.org\). The error message indicates a 404 Not Found or 410 Gone from the sum database. The developer initially thinks it's an authentication issue with the Git provider, but Git clones work fine. They might try GONOSUMCHECK, which bypasses the check but doesn't fix the underlying proxy issue. The root cause is that the Go toolchain defaults to fetching modules and their checksums via the public Go module proxy and checksum database. Private repositories should never be leaked to public proxies. Setting GOPRIVATE tells the Go toolchain to bypass both the public proxy \(proxy.golang.org\) and the checksum database \(sum.golang.org\) for matching patterns, fetching directly from the source VCS instead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:19:02.786131+00:00— report_created — created