Skip to content

go modules 1.13 go get private repository #36725

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

Closed
ilhameq opened this issue Jan 24, 2020 · 3 comments
Closed

go modules 1.13 go get private repository #36725

ilhameq opened this issue Jan 24, 2020 · 3 comments

Comments

@ilhameq
Copy link

ilhameq commented Jan 24, 2020

What version of Go are you using (go version)?
$ go version go1.13.3 linux/amd64

Does this issue reproduce with the latest release?
no

What operating system and processor architecture are you using (go env)?
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/ilhama/go/bin"
GOCACHE="/home/ilhama/.cache/go-build"
GOENV="/home/ilhama/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ilhama/go"
GOPRIVATE="gitlab.com/example@develop"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build008865749=/tmp/go-build -gno-record-gcc-switches"
What did you do?
go get ./...

What did you expect to see?
I expected iimport private repo from gitlab

What did you see instead?
verifying gitlab.com/[email protected]: gitlab.com/[email protected]: reading https://sum.golang.org/lookup/gitlab.com/[email protected]: 410 Gone

How can i specify branch in GOPRIVATE environment variable?
GOPRIVATE="gitlab.com/example@develop" doesn't work

@ilhameq ilhameq changed the title go modules 1.13 go modules 1.13 go get private repository Jan 24, 2020
@ianlancetaylor
Copy link
Contributor

CC @bcmills @jayconrod

@ianlancetaylor
Copy link
Contributor

Note that you will usually get a faster and better answer for a question on a forum. See https://golang.org/wiki/Questions.

@bcmills
Copy link
Contributor

bcmills commented Jan 24, 2020

The go command generally does not care about branches in module mode, except to the extent that in some cases it will resolve them to commits (and then make use of those commits).

So it does not make sense to specify a branch in GOPRIVATE. (GOPRIVATE is a glob of module path prefixes, not URLs.)

@bcmills bcmills closed this as completed Jan 24, 2020
@golang golang locked and limited conversation to collaborators Jan 23, 2021
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

4 participants