# 解决go下载github资源速度慢的问题

**<mark>Bash (Linux or macOS)</mark>**

```plaintext
# 配置 GOPROXY 环境变量
export GOPROXY=https://goproxy.io,direct
# 还可以设置不走 proxy 的私有仓库或组，多个用逗号相隔（可选）
export GOPRIVATE=git.mycompany.com,github.com/my/private
```

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703642855178/d0c1c2bb-8b62-4423-803e-deb0d0b6d88d.jpeg align="center")
