Go "410 Gone" fetching module from proxy - Fix in CI
A 410 Gone from proxy.golang.org means the proxy will not serve that path. It is either a genuinely missing version or a transient proxy failure that clears on retry.
What this error means
A module fetch fails with reading https://proxy.golang.org/.../@v/vX.Y.Z.info: 410 Gone. A reproducible 410 means the version is gone; an intermittent one is a transient proxy blip.
go
go: github.com/foo/bar@v1.4.0: reading https://proxy.golang.org/github.com/foo/bar/@v/v1.4.0.info: 410 Gone
server response: not found: ... invalid version: unknown revision v1.4.0Common causes
Version no longer exists upstream
A tag was deleted or never published, so the proxy has nothing to serve for that version - a deterministic 410.
Transient proxy failure
The proxy momentarily returned 410 for a path that does resolve on retry - a flaky network or proxy state.
How to fix it
Pin a version that exists
- List the available versions and require one that actually exists.
- Run go mod tidy and commit.
Terminal
go list -m -versions github.com/foo/bar
go get github.com/foo/bar@v1.4.1
go mod tidyRetry a transient 410
- Re-run the fetch; transient proxy 410s usually clear immediately.
.github/workflows/ci.yml
for i in 1 2 3; do go mod download && break; sleep 5; doneHow to prevent it
- Pin exact, published versions and avoid deleted tags.
- Cache the Go module cache so resolved versions are reused.
- Add a bounded retry around module downloads for transient proxy errors.
Related guides
Go module download i/o timeout from proxy - Fix in CIFix Go module download "i/o timeout" / connection reset from the proxy in CI - a transient network failure. A…
Go private module 410/auth failure (GOPRIVATE) - Fix in CIFix Go private module "410 Gone" or auth failures in CI - the proxy/sum DB cannot reach a private repo. Set G…
Go "invalid version" fetching module - Fix in CIFix Go "invalid version: unknown revision" / malformed version in CI - the requested module version is not a…