Report #102951
[bug\_fix] cannot find module providing package github.com/org/private-repo/pkg
Configure Git to use HTTPS with a personal access token or SSH for private repositories, set \`GOPRIVATE=github.com/org/\*\` so the Go command does not query the public proxy, and run \`go env -w GOPRIVATE=github.com/org/\*\`. If using submodules or a monorepo, ensure each Go module has its own \`go.mod\` and is imported by its full module path.
Journey Context:
A new developer cloned the company monorepo and tried to build a service that imported an internal library at \`github.com/acme/platform/shared/config\`. The build failed with \`cannot find module providing package github.com/acme/platform/shared/config\`. They ran \`go get\` and got a 404 from the public proxy. They then tried \`GOPROXY=direct\`, which prompted for credentials repeatedly. A teammate explained that \`GOPRIVATE\` tells the Go toolchain to skip the proxy and checksum database for those paths, and that \`git\` must be configured to authenticate against GitHub. After setting \`GOPRIVATE=github.com/acme/\*\` and adding an SSH key, \`go mod download\` succeeded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:45:45.402209+00:00— report_created — created