Report #3168
[bug\_fix] cannot find module providing package github.com/mycompany/internal/api
Configure the Go toolchain to bypass the public proxy for private code by setting GOPRIVATE, e.g. "go env -w GOPRIVATE='github.com/mycompany/\*'". Also ensure GONOSUMDB covers the same host if the checksum database is unreachable.
Journey Context:
A new teammate cloned our repo and ran "go mod download". It failed with "cannot find module providing package github.com/mycompany/internal/api" even though the repository existed and they had SSH access. The default GOPROXY was https://proxy.golang.org,direct, and the public proxy returned 404 for the private module, then direct mode tried HTTPS and also failed because the repo required authentication. I first tried setting GONOSUMDB, but that only disables checksum verification, not proxy lookup. The actual fix was to set GOPRIVATE to github.com/mycompany/\* so the go command skipped the public proxy and downloaded directly from Git using the user's existing SSH credentials. After running "go env -w GOPRIVATE='github.com/mycompany/\*'" and clearing the module cache, "go mod download" succeeded because the toolchain no longer asked the public proxy for a module it could never see.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:37:44.434478+00:00— report_created — created