go version
)?$ go version go version go1.13 darwin/amd64
YES
go env
)?go env
Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/langohr/goprojects/bin"
GOCACHE="/Users/langohr/Library/Caches/go-build"
GOENV="/Users/langohr/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-mod=vendor"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/langohr/goprojects"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/Cellar/go/1.13/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/langohr/projects/vauwede/financial-math-service/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6d/7l9kfrrj17sb80lclkrttzrw0000gp/T/go-build160674302=/tmp/go-build -gno-record-gcc-switches -fno-common"
I have a go module project that uses an other module, witch is in out private bitbucket.
$ go mod vendor
verifying bitbucket.org/vauwede/server-log@v0.2.1/go.mod: bitbucket.org/vauwede/server-log@v0.2.1/go.mod: reading https://sum.golang.org/lookup/bitbucket.org/vauwede/server-log@v0.2.1: 410 Gone
No errors.
verifying bitbucket.org/vauwede/server-log@v0.2.1/go.mod: bitbucket.org/vauwede/server-log@v0.2.1/go.mod: reading https://sum.golang.org/lookup/bitbucket.org/vauwede/server-log@v0.2.1: 410 Gone
I also called the URL https://sum.golang.org/lookup/bitbucket.org/vauwede/server-log@v0.2.1 direcly and see:
not found: reading https://api.bitbucket.org/2.0/repositories/vauwede/server-log?fields=scm: 403 Forbidden
With go v1.12 all this works correctly.
I think the private repo should not go over https://sum.golang.org I also tried
GOPRIVATE=bitbucket.org/vauwede/*
but without any success.
@guybrand Can you help me?
Try setting GOPRIVATE
to bitbucket.org/vauwede
, as suggested by the documentation.
Yes this is the solution:
`
$ export GOPRIVATE=bitbucket.org/vauwede
check it:
$ go env | grep GOP
GOPATH="/Users/langohr/goprojects"
GOPRIVATE="bitbucket.org/vauwede"
GOPROXY="direct"
$ go mod vendor
go: downloading bitbucket.org/vauwede/server-log v0.2.1
go: extracting bitbucket.org/vauwede/server-log v0.2.1
`
Thank you very much!
Most helpful comment
Yes this is the solution:
`
$ export GOPRIVATE=bitbucket.org/vauwede
check it:
$ go env | grep GOP
GOPATH="/Users/langohr/goprojects"
GOPRIVATE="bitbucket.org/vauwede"
GOPROXY="direct"
$ go mod vendor
go: downloading bitbucket.org/vauwede/server-log v0.2.1
go: extracting bitbucket.org/vauwede/server-log v0.2.1
`
Thank you very much!