go: proxy.golang.org: returns not found for @v/list of a module deleted from the origin
What version of Go are you using (go version)?
$ go version
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
$ curl https://proxy.golang.org/github.com/belogik/goes/@v/list
not found: github.com/belogik/goes@latest: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/0c31a160b38443d5e33ca2a5e60e51734d83293b66dc3d9b0c12699f8d2b5cec: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
What did you expect to see?
List of available versions.
What did you see instead?
Error.
The reason seems due to github.com/belogik/goes was recently removed by the author. If I query for specific version, proxy still returns the result.
$ curl https://proxy.golang.org/github.com/belogik/goes/@v/v0.0.0-20151229125003-e54d722c3aff.info
{"Version":"v0.0.0-20151229125003-e54d722c3aff","Time":"2015-12-29T12:50:03Z"}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (15 by maintainers)
After internal discussion, we think this behavior of
proxy.golang.orgis, if not an outright bug, undesirable. The module author is free to setGOPRIVATEand do whatever they need to do, but downstream users can’t add a dependency on the module without knowing a valid pseudoversion somehow.This isn’t the user experience we want
proxy.golang.orgto give. I’ll work on changing it to successfully return an empty list so that thegocommand will fall back to@latest.Hmm, should
/@v/listreturn a 200 with an empty list then? It looks like/@latestfor this module returns 200 with a pseudo-version.The
gocommand will request/@v/listfirst, and if that fails with any error (including 404, 410), we’ll fall back to the next proxy. We only request/@latestif the request for/@v/listis successful but contains no suitable versions.Proxy.golang.org returns known non pseudo versions if there are cached ones available for use. In this specific case, I think there are no non-pseudo versions.