英文:
403 forbidden when downloading mongoDB driver for golang
问题
我正在尝试在VS Code的项目中使用以下命令下载MongoDB的Golang驱动程序:
go get go.mongodb.org/mongo-driver/mongo
但是我遇到了403禁止错误,错误信息如下:
go: downloading github.com/klauspost/compress v1.13.6
go.mongodb.org/mongo-driver/mongo imports
github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.13.6: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.6.zip: 403 Forbidden
我猜想可能是我的IP地址受限制,所以我尝试使用几个VPN(如psiphon和hotspot shield)进行下载,但仍然遇到相同的错误。
英文:
I'm trying to download mongoDB golang driver to a project in VS code running this command in the VS code terminal:
go get go.mongodb.org/mongo-driver/mongo
but I'm getting 403 forbidden error like this:
go: downloading github.com/klauspost/compress v1.13.6
go.mongodb.org/mongo-driver/mongo imports
github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.13.6: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.6.zip: 403 Forbidden
I've figured maybe my ip address is restriced so I've tried downloading it using several VPNs like psiphon and hotspot shield but I'm still getting the same error.
答案1
得分: 1
你可以通过以下方式暂时跳过使用GOPROXY:
GORPOXY='direct' go get YOUR_URL
这样,它会跳过goproxy的检查,直接从提供的目标地址下载你的仓库。
英文:
You can temporarily skip using GOPROXY by:
GORPOXY='direct' go get YOUR_URL
This way, it skips the goproxy checking and directly downloads your repo from provided destination.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论