cacheport

Error · Go modules

Fixing Go "proxy.golang.org ... i/o timeout"

The go command could not open a connection to the module proxy before the timeout. Nothing was downloaded; the failure is in reaching proxy.golang.org at all.

What you see

build log
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 timeout

Common 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

  1. 01

    Check what the go command uses

    Confirm the current proxy settings before changing them.

    shell
    go env GOPROXY GONOSUMDB GOPRIVATE
  2. 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
  3. 03

    Download modules once per build

    Run go mod download early so failures show up before compilation starts.

    shell
    go mod download
    go build ./...

Other network failures in builds

Start on the free plan

20 GB of cache, every registry, unlimited users. Upgrade when your pipelines outgrow it.