# go: 模块 github.com/user/private-repo@v1.0.0: 读取 https://proxy.golang.org/github.com/user/private-repo/@v/v1.0.0.info: 404 Not Found

- **ID:** `go/module-not-found-in-go-path`
- **领域:** go
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

Go 代理 (proxy.golang.org) 找不到该模块版本，可能是因为模块是私有的且无法通过默认代理访问，或者版本标签在仓库中不存在。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| go1.17 | active | — | — |
| go1.18 | active | — | — |
| go1.19 | active | — | — |
| go1.20 | active | — | — |
| go1.21 | active | — | — |

## 解决方案

1. ```
   Set GONOSUMCHECK and GONOSUMDB, then use `GONOSUMCHECK=* GONOSUMDB=* GOPROXY=direct go get github.com/user/private-repo@v1.0.0` to bypass the proxy entirely.
   ```
2. ```
   If the repo is private, configure git with a personal access token: `git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"` then set `GOPRIVATE=github.com/user/private-repo`.
   ```

## 无效尝试

- **** — Tidy doesn't bypass proxy; it still queries the same proxy URL which returns 404. (90% 失败率)
- **** — The error is about module retrieval (404), not checksum verification. (50% 失败率)
