go
auth_error
ai_generated
partial
go: github.com/foo/[email protected]: 读取 https://proxy.golang.org/github.com/foo/bar/@v/v1.0.0.info: 403 禁止访问
go: github.com/foo/[email protected]: reading https://proxy.golang.org/github.com/foo/bar/@v/v1.0.0.info: 403 Forbidden
ID: go/proxy-403-forbidden
80%修复率
80%置信度
0证据数
2024-08-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.13 | active | — | — | — |
| 1.22 | active | — | — | — |
根因分析
模块代理返回 403,可能是模块是私有的需要认证,或代理阻止了访问。
English
The module proxy returns 403, likely because the module is private and requires authentication, or the proxy blocks it.
解决方案
-
80% 成功率
Set GONOSUMDB and GOPRIVATE, then use 'go env -w GOPRIVATE=github.com/foo/*' and use a .netrc file
-
60% 成功率
GOPROXY=https://goproxy.io,direct go mod download
无效尝试
常见但无效的做法:
-
50% 失败
If the module is private, direct access will also require authentication and fail.
-
70% 失败
The fork may have different code and not be officially supported.