go
network_error
ai_generated
true
go: 从代理读取模块时连接被拒绝: dial tcp 216.58.194.113:443: connect: connection refused
go: github.com/example/[email protected]: reading https://proxy.golang.org/github.com/example/pkg/@v/v0.1.0.mod: dial tcp 216.58.194.113:443: connect: connection refused
ID: go/proxy-connection-refused
80%修复率
87%置信度
0证据数
2024-06-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.19 | active | — | — | — |
| 1.20 | active | — | — | — |
| 1.21 | active | — | — | — |
根因分析
Go 模块代理无法访问,由于网络问题、防火墙阻止或代理宕机。
English
The Go module proxy is unreachable due to network issues, firewall blocks, or proxy downtime.
解决方案
-
85% 成功率 Use a different proxy or direct source.
Set 'export GOPROXY=direct' to bypass the proxy and fetch directly from VCS.
-
70% 成功率 Configure a corporate proxy or VPN if behind a firewall.
Set 'export GOPROXY=http://corporate-proxy:8080' or use 'https_proxy' environment variable.
无效尝试
常见但无效的做法:
-
Retrying with 'go get -u' which uses the same proxy.
90% 失败
The proxy is still unreachable; retrying doesn't change network conditions.
-
Setting GOFLAGS=-insecure to ignore TLS errors.
80% 失败
The error is connection refused, not TLS; this doesn't help.