Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go mod download can't find module tag v0.0.1 #41484

Closed
dwschulze opened this issue Sep 18, 2020 · 5 comments
Closed

go mod download can't find module tag v0.0.1 #41484

dwschulze opened this issue Sep 18, 2020 · 5 comments
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@dwschulze
Copy link

dwschulze commented Sep 18, 2020

$ go version
go1.15.1 linux/amd64

I have a module in github.

I added this to my ~/.gitconfig: [url "ssh://git@github.com/"] insteadOf = https://github.com/

When I try to use the module from my main go mod download cannot find v0.0.1 of the module even though the tag v0.0.1 exists in github:

$ go run main.go
go: github.com/dwschulze/go-module-test-dateutilmod@v0.0.1/go.mod: verifying module: github.com/dwschulze/go-module-test-dateutilmod@v0.0.1/go.mod: reading https://sum.golang.org/lookup/github.com/dwschulze/go-module-test-dateutilmod@v0.0.1: 410 Gone
        server response: not found: github.com/dwschulze/go-module-test-dateutilmod@v0.0.1: invalid version: unknown revision v0.0.1

$ go mod download  github.com/dwschulze/go-module-test-dateutilmod@v0.0.1
github.com/dwschulze/go-module-test-dateutilmod@v0.0.1/go.mod: verifying module: github.com/dwschulze/go-module-test-dateutilmod@v0.0.1/go.mod: reading https://sum.golang.org/lookup/github.com/dwschulze/go-module-test-dateutilmod@v0.0.1: 410 Gone
	server response: not found: github.com/dwschulze/go-module-test-dateutilmod@v0.0.1: invalid version: unknown revision v0.0.1

The tag v0.0.1 exists:

$ git clone git@github.com:dwschulze/go-module-test-dateutilmod.git
Cloning into 'go-module-test-dateutilmod'...
...
$ cd go-module-test-dateutilmod/
$ git tag
v0.0.1
@bcmills
Copy link
Contributor

bcmills commented Sep 18, 2020

@bcmills bcmills added modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 18, 2020
@bcmills
Copy link
Contributor

bcmills commented Sep 18, 2020

That said, we should give a better error message for this.

@bcmills
Copy link
Contributor

bcmills commented Sep 18, 2020

Duplicate of #25982

@bcmills bcmills marked this as a duplicate of #25982 Sep 18, 2020
@bcmills bcmills closed this as completed Sep 18, 2020
@dwschulze
Copy link
Author

dwschulze commented Sep 19, 2020

I was able to get this to work with export GOPRIVATE=githib.com. So I thought I understood what the problem was and what the solution was. But then if I delete GOPATH/pkg and do unset GOPRIVATE I found that it still works. It downloads the module into GOPATH/pkg:

$ echo $GOPRIVATE

$ go run main.go
go: downloading github.com/dwschulze/go-module-test-dateutilmod v0.0.1
github:  2020-09-18 18:21:58.244789426 -0600 MDT  //  output from main()

But it shouldn't work with GOPRIVATE unset. What is going on that it works? Is there a hidden cache somewhere?

@dwschulze
Copy link
Author

I do not believe that this is a duplicate of #25982. That is an earlier version of go and the issue seems to be credentials for vcs repos, not what go mod download does.

@golang golang locked and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants