# go: 模块 github.com/foo/bar@v1.2.3: 读取 https://proxy.golang.org/.../v1.2.3.mod: 404 未找到

- **ID:** `go/module-not-found-reading-https-proxy`
- **领域:** go
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

所请求的模块版本在代理上不存在，或模块路径拼写/大小写错误。Go 模块路径区分大小写，且需要精确的 tag（如 v1.2.3，而非 v1.2）。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.16+ | active | — | — |
| 1.21+ | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   git ls-remote --tags https://github.com/foo/bar | grep v1.2.3
go get github.com/foo/bar@v1.2.3
   ```
2. **** (90% 成功率)
   ```
   GOPRIVATE=github.com/foo/* GONOSUMDB=github.com/foo/* GOPROXY=direct go get github.com/foo/bar@v1.2.3
   ```
3. **** (80% 成功率)
   ```
   go get github.com/foo/bar@<commit-sha>
   ```

## 无效尝试

- **** — go still needs to resolve the original module graph and reports 'replacement directory does not exist' (70% 失败率)
- **** — clearing cache does not create a missing version on the proxy (85% 失败率)
- **** — does not change remote availability of the module version (90% 失败率)
