gpt4 book ai didi

go - 无法通过 HTTP 代理 `go get` 存储库

转载 作者:IT王子 更新时间:2023-10-29 01:15:55 26 4
gpt4 key购买 nike

当我尝试安装 Burrow 时 https://github.com/linkedin/Burrow#build-and-install

go get github.com/linkedin/Burrow

我收到以下错误:

package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1" 
(https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)

我已经通过以下方式设置了代理:

export http_proxy=myproxy:port
export https_proxy=myproxy:port

编辑:

go get -u gopkg.in/gcfg.v1

同样报错:

package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1" 
(https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)

编辑1:

go get -v gopkg.in/gcfg.v1

Fetching https://gopkg.in/gcfg.v1?go-get=1
https fetch failed: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused
package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1" (https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)

最佳答案

我也遇到了同样的错误。原来我的 https 代理不正确。确保 http 和 https 代理都指向以 http 开头的同一个代理。

export http_proxy=<http://proxy:port>
export https_proxy=<http://proxy:port>

关于go - 无法通过 HTTP 代理 `go get` 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42295200/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com