Navigation Menu

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

cmd/go: go get go 1.13 cannot fetch vX.Y.Z if tag X.Y.Z is defined #32867

Closed
AndersonQ opened this issue Jul 1, 2019 · 4 comments
Closed

cmd/go: go get go 1.13 cannot fetch vX.Y.Z if tag X.Y.Z is defined #32867

AndersonQ opened this issue Jul 1, 2019 · 4 comments
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@AndersonQ
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version go1.13beta1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/andersonqueiroz/Library/Caches/go-build"
GOENV="/Users/andersonqueiroz/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/andersonqueiroz/devel/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/andersonqueiroz/sdk/go1.13beta1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/andersonqueiroz/sdk/go1.13beta1/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/tmp/test/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/47/f0fcm9lx2f7bs36r73tnmlpc0000gn/T/go-build668830074=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

In an empty folder:

go1.13beta1 mod init bla
go1.13beta1 get github.com/AndersonQ/go1_13_mod_test@v1.1.0

What did you expect to see?

the module been added to go.mod:

go get github.com/AndersonQ/go1_13_mod_test@v1.1.0

Using go version go1.12.6 darwin/amd64 it just works. I know it's odd to a repo to have both tags 1.1.0 and v1.1.0. But for no good reason we have in my company and as I was trying go 1.13 beta1 I run into this problem

I created the repo AndersonQ/go1_13_mod_test to be able to reproduce it with a public repo.

What did you see instead?

$ go1.13beta1 get github.com/AndersonQ/go1_13_mod_test@v1.1.0                                                                                                                                                                    ‹ruby-2.4.1›
verifying github.com/AndersonQ/go1_13_mod_test@v1.1.0/go.mod: github.com/AndersonQ/go1_13_mod_test@v1.1.0/go.mod: reading https://sum.golang.org/lookup/github.com/!anderson!q/go1_13_mod_test@v1.1.0: 410 Gone

However if I use 1.1.0 (go1.13beta1 get github.com/AndersonQ/go1_13_mod_test@1.1.0), it works adding the dependency with pseudo-version

cat go.mod Output
module bla

go 1.13

require github.com/AndersonQ/go1_13_mod_test v0.0.0-20190701100952-ced54b8ce3d7 // indirect

@agnivade
Copy link
Contributor

agnivade commented Jul 1, 2019

I am unable to reproduce this.

$cd `mktemp -d`
$go1.13beta1 mod init bla
$go1.13beta1 get github.com/AndersonQ/go1_13_mod_test@v1.1.0
go: finding github.com/AndersonQ/go1_13_mod_test v1.1.0
go: downloading github.com/AndersonQ/go1_13_mod_test v1.1.0
go: extracting github.com/AndersonQ/go1_13_mod_test v1.1.0
$cat go.mod 
module bla

go 1.13

require github.com/AndersonQ/go1_13_mod_test v1.1.0 // indirect

@AndersonQ
Copy link
Contributor Author

@agnivade indeed, even I cannot reproduce it now. However it still happening on my private repo. I'll investigate more.

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 1, 2019
@jayconrod
Copy link
Contributor

You mentioned this was a private repo, but the error message is from sumdb.golang.org. The Go module mirror and sum database won't be able to access this repo if it's not publicly visible. Could you try setting GOPRIVATE to exclude this repo? For example, export GOPRIVATE=github.com/AndersonQ/*.

In general, sumdb.golang.org may serve a 410 if it can't load the module at that version. There are many reasons that could happen (unfortunately, we don't have very descriptive error messages yet). You might also try temporarily setting GOPROXY=direct and GOSUMDB=off if that gives a clearer message.

@AndersonQ
Copy link
Contributor Author

@jayconrod GOPRIVATE=github.com/My_ORG/* did the trick!

So I believe my problem was reproducible earlier today because Go module mirror and Go checksum database had not indexed my example repo yet. Therefore go get behaved the same way it behaves with my private one.

Thanks guys!

@golang golang locked and limited conversation to collaborators Jun 30, 2020
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

4 participants