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: GO111MODULE=on go get -v -insecure gitlab.com/xxx/xxx failed #32569

Closed
KielChan opened this issue Jun 12, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@KielChan
Copy link

commented Jun 12, 2019

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

$ go version
go version go1.12.1 linux/amd64

Does this issue reproduce with the latest release?

I am not sure.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build123327735=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I have a package in gitlab repo, but path in the package shows like "github.com/xxx/xxx"

so, I replace it like this in go.mod:

module gitlab.com/grp/proj

go 1.12

require (

	github.com/xxx/xxx v1.0.0


replace github.com/xxx/xxx v1.0.0 => gitlab.com/xxx/xxx v0.0.0-xxxxxx-xxxxx

on my macOS, I can exec cmd GO111MODULE=on go get -v -insecure gitlab.com/xxx/xxx to pre-install it and then, when I exec cmd GOOS=linux GOARCH=amd64 CGO_ENABLED=1 GO111MODULE=on GOPROXY=https://athens.azurefd.net go build, it exit 0.

But when the cmd GO111MODULE=on go get -v -insecure gitlab.com/xxx/xxx executed in golang:v1.12.1 container, it may try to pull module in go.mod and without GOPROXY it failed in the end.

The go env and go version executed in golang:1.12.1

I want to know why.

What did you expect to see?

I can pre-install go module solely, not all of them in go.mod

What did you see instead?

@FiloSottile FiloSottile changed the title GO111MODULE=on go get -v -insecure gitlab.com/xxx/xxx failed cmd/go: GO111MODULE=on go get -v -insecure gitlab.com/xxx/xxx failed Jun 13, 2019

@FiloSottile

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

/cc @bcmills @jayconrod

By the way, why are you using -insecure?

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

without GOPROXY it failed in the end.

  • What was the failure message?
  • The current go release is 1.12.6. Can you still reproduce the problem using that release instead of 1.12.1?
  • Is the GitLab repo private? (Is this an instance of #29888 or #29094?)
@gopherbot

This comment has been minimized.

Copy link

commented Jul 13, 2019

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Jul 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.