首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如果从属关系尝试从互联网下载,如何配置代理?

如果从属关系尝试从互联网下载,如何配置代理?
EN

Stack Overflow用户
提问于 2018-07-06 16:00:15
回答 0查看 1.5K关注 0票数 1

我有GoLang

代码语言:javascript
运行
复制
go version go1.10.3 windows/amd64

在我们的公司网络中,只能通过代理访问互联网。

在git客户端中设置了

代码语言:javascript
运行
复制
git config --global http.proxy http://user:password@proxy:8118

它确实对这一个有效。

代码语言:javascript
运行
复制
c:\go\bin\go get -u -v github.com/prometheus/client_golang/prometheus

但是如果在新的pkg中确实有一个依赖项,例如

代码语言:javascript
运行
复制
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.)

如果依赖项尝试从互联网下载,如何配置代理?

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51205634

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档