I have GoLang
go version go1.10.3 windows/amd64
In our corporate network access to internet only via Proxy.
in git client did set
git config --global http.proxy http://user:password@proxy:8118
It did work for this one
c:\go\bin\go get -u -v github.com/prometheus/client_golang/prometheus
BUT if in new pkg did have a dependency for example
C:\Windows\system32>c:\go\bin\go get -u -v github.com/prometheus/common/log
github.com/prometheus/common (download)
github.com/sirupsen/logrus (download)
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
https fetch failed: Get https://golang.org/x/crypto/ssh/terminal?go-get=1: dial tcp 193.184.73.141:4
43: connectex: No connection could be made because the target machine actively refused it.
package golang.org/x/crypto/ssh/terminal: unrecognized import path "golang.org/x/crypto/ssh/terminal
" (https fetch: Get https://golang.org/x/crypto/ssh/terminal?go-get=1: dial tcp 193.184.73.141:443:
connectex: No connection could be made because the target machine actively refused it.)
Fetching https://golang.org/x/sys/windows/svc/eventlog?go-get=1
https fetch failed: Get https://golang.org/x/sys/windows/svc/eventlog?go-get=1: dial tcp 193.184.73.
141:443: connectex: No connection could be made because the target machine actively refused it.
package golang.org/x/sys/windows/svc/eventlog: unrecognized import path "golang.org/x/sys/windows/sv
c/eventlog" (https fetch: Get https://golang.org/x/sys/windows/svc/eventlog?go-get=1: dial tcp 193.1
94.173.141:443: connectex: No connection could be made because the target machine actively refused it
.)
Fetching https://gopkg.in/alecthomas/kingpin.v2?go-get=1
https fetch failed: Get https://gopkg.in/alecthomas/kingpin.v2?go-get=1: dial tcp 135.186.143.184:443
: connectex: No connection could be made because the target machine actively refused it.
package gopkg.in/alecthomas/kingpin.v2: unrecognized import path "gopkg.in/alecthomas/kingpin.v2" (h
ttps fetch: Get https://gopkg.in/alecthomas/kingpin.v2?go-get=1: dial tcp 135.186.143.184:443: connec
tex: No connection could be made because the target machine actively refused it.)
How to configure proxy if a dependency tries to download from internet?