Skip to content
Latchkey

Go "reading X: 404/410 Not Found" fetching module - Fix in CI

A 404 or 410 from the module proxy means it will not serve that path. It is either a version that truly does not exist or a transient proxy failure that clears on retry.

What this error means

A fetch fails with reading https://proxy.golang.org/.../@v/vX.Y.Z.info: 404 Not Found (or 410 Gone). A reproducible code is a missing version; an intermittent one is a transient proxy blip.

go
go: github.com/foo/bar@v1.5.0: reading https://proxy.golang.org/github.com/foo/bar/@v/v1.5.0.info: 404 Not Found
	server response: not found: github.com/foo/bar@v1.5.0: invalid version: unknown revision v1.5.0

Common causes

Version does not exist upstream

A tag was deleted or never published, so the proxy has nothing to serve - a deterministic 404/410.

Transient proxy failure

The proxy momentarily returned 404/410 for a path that does resolve on retry.

How to fix it

Pin a version that exists

  1. List available versions and require one that actually exists.
  2. Run go mod tidy and commit.
Terminal
go list -m -versions github.com/foo/bar
go get github.com/foo/bar@v1.5.1
go mod tidy

Retry a transient code

  1. Re-run the fetch; transient 404/410s usually clear immediately.
.github/workflows/ci.yml
for i in 1 2 3; do go mod download && break; sleep 5; done

How to prevent it

  • Pin exact, published versions and avoid deleted tags.
  • Cache the module cache so resolved versions are reused.
  • Add a bounded retry around downloads for transient proxy errors.

Frequently asked questions

What causes ""reading X: 404/410""?
A tag was deleted or never published, so the proxy has nothing to serve - a deterministic 404/410.
How do I fix "reading X: 404/410"?
Pin a version that exists

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card