# go: github.com/foo/bar@v1.0.0: 读取 https://proxy.golang.org/github.com/foo/bar/@v/v1.0.0.info: 403 禁止访问

- **ID:** `go/proxy-403-forbidden`
- **领域:** go
- **类别:** auth_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

模块代理返回 403，可能是模块是私有的需要认证，或代理阻止了访问。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.13 | active | — | — |
| 1.22 | active | — | — |

## 解决方案

1. **** (80% 成功率)
   ```
   Set GONOSUMDB and GOPRIVATE, then use 'go env -w GOPRIVATE=github.com/foo/*' and use a .netrc file
   ```
2. **** (60% 成功率)
   ```
   GOPROXY=https://goproxy.io,direct go mod download
   ```

## 无效尝试

- **** — If the module is private, direct access will also require authentication and fail. (50% 失败率)
- **** — The fork may have different code and not be officially supported. (70% 失败率)
