Closed
Description
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 blago 1.13
require github.com/AndersonQ/go1_13_mod_test v0.0.0-20190701100952-ced54b8ce3d7 // indirect
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
agnivade commentedon Jul 1, 2019
I am unable to reproduce this.
AndersonQ commentedon Jul 1, 2019
@agnivade indeed, even I cannot reproduce it now. However it still happening on my private repo. I'll investigate more.
jayconrod commentedon Jul 1, 2019
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 settingGOPRIVATE
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 settingGOPROXY=direct
andGOSUMDB=off
if that gives a clearer message.AndersonQ commentedon Jul 1, 2019
@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!