What you see
go: github.com/stretchr/testify@v1.10.0: Get "https://proxy.golang.org/github.com/stretchr/testify/@v/v1.10.0.mod": dial tcp 142.250.185.81:443: i/o timeoutCommon causes
- Networks where proxy.golang.org is blocked or unreliable.
- Firewalls on self-hosted runners that only allow specific hosts.
- Broken IPv6 routes.
How to fix it
- 01
Check what the go command uses
Confirm the current proxy settings before changing them.
shell go env GOPROXY GONOSUMDB GOPRIVATE - 02
Use a reachable proxy
Point GOPROXY at a cache your runners can reach. Checksums are still verified against go.sum.
shell go env -w GOPROXY=https://acme.cacheport.cc/go,direct - 03
Download modules once per build
Run go mod download early so failures show up before compilation starts.
shell go mod download go build ./...