Ask questionscmd/go: invalid version: unknown revision when GOPROXY/GOSUMDB disabled
<pre> $ go version go version go1.13.5 linux/amd64 </pre>
1.13.6 is not yet packaged for my distro
<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/cape/.cache/go-build" GOENV="/home/cape/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="github.com/COMPANY-REPO/" GONOSUMDB="github.com/COMPANY-REPO/" GOOS="linux" GOPATH="/home/cape/dev" GOPRIVATE="github.com/COMPANY-REPO/*" GOPROXY="direct" GOROOT="/usr/lib/golang" GOSUMDB="off" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/cape/dev/src/github.com/fluxcd/flux/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build206448337=/tmp/go-build -gno-record-gcc-switches" </pre></details>
(The only concious override from defaults is setting
export GOPRIVATE=github.com/COMPANY-REPO/* in .bashrc, the rest are changed by go or the distro)
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
go mod download. Note that there are no private repos involved.
go: email@example.com: invalid version: unknown revision ca3e8f451dd0
Troubleshooting was done on Slack with @Helcaraxan, see https://app.slack.com/client/T029RQSE6/C9BMAAFFB/thread/C9BMAAFFB-1579255221.002900
The error was resolved by overriding the Fedora defaults of
GOSUMDB=off (see here for the reasoning).
It seems unexpected that disabling sum checks would prevent fetching a specific dependency? I've been using the setup for several months without running into this with other repos.
Note that there are no firewalls/proxies other things intercepting traffic, so access to Github is not a problem.
Answer questions Helcaraxan
Ok. Dug a bit further and solved the problem. It's not an issue with the
go toolchain itself.
GOPROXY=directinstead of the usual
GOPROXY=https://proxy.golang.orgthen resulted in the case of @carlpett to bypass the proxy and instead try to clone the actual repo and find the appropriate revision which had already been deleted.
I believe this means we can close this issue.