Report #36121
[bug\_fix] go: github.com/myorg/[email protected]: reading github.com/myorg/private-lib/go.mod at revision v1.2.3: unknown revision v1.2.3
Set the \`GOPRIVATE\` environment variable to include the private repository domain \(e.g., \`go env -w GOPRIVATE=github.com/myorg/\*\`\), then retry the build.
Journey Context:
A developer tries to pull a newly released version of a private dependency: \`go get github.com/myorg/[email protected]\`. It fails with \`unknown revision v1.2.3\`. They verify the tag exists in their internal Git repository. They try again and again, clearing the cache, but Go insists the revision doesn't exist. The rabbit hole leads them to the \`GOPROXY\` environment variable, which defaults to \`https://proxy.golang.org,direct\`. The public Go module proxy cannot access their private repository, so it returns a 404/410. The \`direct\` fallback should work, but sometimes the proxy's error takes precedence or the VCS tool isn't configured correctly. The fix is to set the \`GOPRIVATE\` environment variable to \`github.com/myorg\`. This tells the Go toolchain to bypass the public proxy and checksum database entirely for that domain, fetching directly from the source repository and resolving the version tag successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:06:21.078343+00:00— report_created — created