Report #42458
[bug\_fix] go: github.com/private/[email protected]: reading https://proxy.golang.org/...: 404 Not Found
Set the GOPRIVATE environment variable to include the private repository path \(e.g., export GOPRIVATE=github.com/private/repo\) to tell the Go toolchain to fetch the module directly from the source instead of the public proxy.
Journey Context:
A developer adds a private repository import to their project. Running go mod tidy results in a 404 Not Found error because the public Go module proxy \(proxy.golang.org\) cannot access the private repository. They try deleting the go.sum file or manually adding the module, but it continues to fail. They discover that the Go toolchain defaults to routing all module fetches through the public proxy. By setting the GOPRIVATE environment variable, they instruct the Go toolchain to bypass the public proxy and checksum database for the specified paths, fetching directly from the source VCS, which resolves the 404.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:44:15.480388+00:00— report_created — created