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: Go get ignores user and passwords in Proxy settings #32568

Closed
ixidion opened this issue Jun 12, 2019 · 2 comments
Closed

cmd/go: Go get ignores user and passwords in Proxy settings #32568

ixidion opened this issue Jun 12, 2019 · 2 comments

Comments

@ixidion
Copy link

@ixidion ixidion commented Jun 12, 2019

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

$ go version go1.12.2 gccgo (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1) linux/amd64

Does this issue reproduce with the latest release?

Haven't compiled from source.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myuser/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myuser/go"
GOPROXY="http://user:pass@proxyname:8080"
GORACE=""
GOROOT="/usr"
GOTMPDIR=""
GOTOOLDIR="/usr/libexec/gcc/x86_64-redhat-linux/9"
GCCGO="/usr/bin/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-build902069455=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

Run go get -u -v golang.org/x/tools/cmd/guru

I have set the Proxy URL string at multiple locations (/etc/enviroment, local bash profile, git config --global, .hgrc, GOPROXY). Format is http://user:pass@myproxyhost:8080

What did you expect to see?

Normal go get run

What did you see instead?

Produces a lot of "Proxy Authentication Required" errors. It seems like go get ignores user and password from Proxy URL-String.

Fetching https://golang.org/x/tools/cmd/guru?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/guru?go-get=1: Proxy Authentication Required
golang.org/x/tools (download)
Fetching https://golang.org/x/tools/cmd/guru/serial?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/guru/serial?go-get=1: Proxy Authentication Required

... and many more of the second type

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jun 13, 2019

This is likely fixed as of CL 170879. Can you reproduce it using a go built from head?

(You can go get golang.org/dl/gotip && gotip download to easily obtain such a build.)

@ixidion

This comment has been minimized.

Copy link
Author

@ixidion ixidion commented Jun 24, 2019

I have built the master branch and it's working without any problems.

@ixidion ixidion closed this Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.