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: require directive fails verifying local modules #33873

Closed
ifnotak opened this issue Aug 27, 2019 · 2 comments
Closed

cmd/go: require directive fails verifying local modules #33873

ifnotak opened this issue Aug 27, 2019 · 2 comments

Comments

@ifnotak
Copy link

ifnotak commented Aug 27, 2019

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

$ go version
go version go1.13rc1 linux/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="/home/abdullah/.cache/go-build"
GOENV="/home/abdullah/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/abdullah/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/abdullah/goroots/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/abdullah/goroots/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/abdullah/project/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-build901671745=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I run go mod tidy with the following go.mod file:

module bar

go 1.13

require (
	local.git.company.intranet/foo v0.0.0-20190827165402-2d7dc3de0e5e
)

What did you expect to see?

I expected go mod tidy to succeed or exit with 0 !

What did you see instead?

It fails with the following output:

verifying local.git.company.intranet/foo@v0.0.0-20190827165402-2d7dc3de0e5e/go.mod: local.git.company.intranet/foo@v0.0.0-20190827165402-2d7dc3de0e5e/go.mod: reading https://sum.golang.org/lookup/local.git.company.intranet/foo@v0.0.0-20190827165402-2d7dc3de0e5e: 410 Gone
$ echo $?
1

This doesn't happen with go1.12. Seems to be related to the go1.13rc1 update adding a check against some sum database.

@ifnotak ifnotak changed the title cmd/go: require directive fails verifying on local modules cmd/go: require directive fails verifying local modules Aug 27, 2019
@tmthrgd
Copy link
Contributor

tmthrgd commented Aug 28, 2019

You’ll need to set the GOPRIVATE environment variable: https://tip.golang.org/cmd/go/#hdr-Module_configuration_for_non_public_modules.

@ifnotak
Copy link
Author

ifnotak commented Aug 28, 2019

You’ll need to set the GOPRIVATE environment variable: https://tip.golang.org/cmd/go/#hdr-Module_configuration_for_non_public_modules.

Thanks a lot! This is exactly what I was missing!

@ifnotak ifnotak closed this as completed Aug 28, 2019
@golang golang locked and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants