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

go get isn't using GOPROXY #42667

Closed
simonstumpf opened this issue Nov 17, 2020 · 1 comment
Closed

go get isn't using GOPROXY #42667

simonstumpf opened this issue Nov 17, 2020 · 1 comment
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@simonstumpf
Copy link

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

$ go version
go version go1.15.5 windows/amd64

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

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\simon\AppData\Local\go-build
set GOENV=C:\Users\simon\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\simon\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\simon\go
set GOPRIVATE=
set GOPROXY=http://xxxxxxx/go-group/
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64

What did you do?

I'm working in a company so we must need to go via a proxy.
For our Openshift builds we're using a GOPROXY (which works), so I'm also trying go via this GOPROXY.
However the go get command always times out.
As you can see the GOPROXY var is filled.

What did you expect to see?

The packages should be installed.

What did you see instead?

go get -x -v github.com/Shopify/sarama
# get https://golang.org/x/net/proxy?go-get=1
# get https://golang.org/x/net/proxy?go-get=1: Get "https://golang.org/x/net/proxy?go-get=1": dial tcp: lookup golang.org: no such host
package golang.org/x/net/proxy: unrecognized import path "golang.org/x/net/proxy": https fetch: Get "https://golang.org/x/net/proxy?go-get=1": dial tcp: lookup golang.org: no such host
# get https://gopkg.in/jcmturner/gokrb5.v7/asn1tools?go-get=1
# get https://gopkg.in/jcmturner/gokrb5.v7/asn1tools?go-get=1: Get "https://gopkg.in/jcmturner/gokrb5.v7/asn1tools?go-get=1": dial tcp: lookup gopkg.in: no such host
package gopkg.in/jcmturner/gokrb5.v7/asn1tools: unrecognized import path "gopkg.in/jcmturner/gokrb5.v7/asn1tools": https fetch: Get "https://gopkg.in/jcmturner/gokrb5.v7/asn1tools?go-get=1": dial tcp: lookup gopkg.in: no such host
@dmitshur
Copy link
Contributor

dmitshur commented Nov 17, 2020

In Go 1.15, the default value for GO111MODULE is auto (the default is changing to "on" in Go 1.16), which selects GOPATH mode if there isn't a go.mod file in any parent directory. You may need to set GO111MODULE=on explicitly.

For questions, please see https://golang.org/wiki/Questions. This doesn't seem to be a problem with the go command, so I'll close this. Please comment otherwise if I missed something.

@dmitshur dmitshur added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 17, 2020
@golang golang locked and limited conversation to collaborators Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants