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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: unknown revision while using `go mod -init` #26711

Closed
juliens opened this issue Jul 31, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@juliens
Copy link
Contributor

commented Jul 31, 2018

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

go version go1.11beta2 linux/amd64

Does this issue reproduce with the latest release?

馃憤

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/juliens/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/juliens/dev/go"
GOPROXY=""
GORACE=""
GOROOT="/home/juliens/.gvm/gos/go1.11beta2"
GOTMPDIR=""
GOTOOLDIR="/home/juliens/.gvm/gos/go1.11beta2/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/juliens/myapp/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-build973323575=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go mod -init on a project with Gopkg.lock

What did you expect to see?

Everything works fine

What did you see instead?

A lots of error like this one:

go: converting Gopkg.lock: stat github.com/go-check/check@ca0bf163426aa183d03fd4949101785c0347f273: unknown revision ca0bf163426aa183d03fd4949101785c0347f273

After investigation, it may come from:

git fetch -f --depth=1 https://github.com/go-check/check ca0bf163426aa183d03fd4949101785c0347f273:refs/dummy
error: Server does not allow request for unadvertised object ca0bf163426aa183d03fd4949101785c0347f273
@oiooj

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

@juliens Can you show your Gopkg.lock file?

@oiooj oiooj added the modules label Jul 31, 2018

@juliens

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2018

@oiooj Sure
https://github.com/containous/traefik/blob/1d53077fc7a7dd24ac3bd825991ecafea31c3b41/Gopkg.lock

This a complicated one, but I can reproduce with a simpler Gopkg.lock file if needed.

@oiooj

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

Duplicate of #24087, I will fix it ASAP, Thanks.

@oiooj oiooj closed this Jul 31, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jul 31, 2018

Change https://golang.org/cl/126915 mentions this issue: cmd/go/internal/modconv: support convert replacements in Gopkg.lock

gopherbot pushed a commit that referenced this issue Apr 25, 2019

cmd/go/internal/modconv: support convert replacements in Gopkg.lock
Fixes #24087.
Updates #26711.

Change-Id: I7fe6b21fd391253a19cb1d35709a061872ea7b6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/126915
Run-TryBot: Baokun Lee <nototon@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.