当使用”go get”命令获取某些公共包时,出现403 Forbidden proxy.github.io错误。

huangapple go评论73阅读模式
英文:

403 Forbidden proxy.github.io when go get some public package

问题

$ go get github.com/jung-kurt/gofpdf
go get:获取模块 github.com/jung-kurt/gofpdf:正在读取 https://proxy.github.io/github.com/jung-kurt/gofpdf/@v/list:403 Forbidden

英文:

$ go get github.com/jung-kurt/gofpdf
go get: module github.com/jung-kurt/gofpdf: reading https://proxy.github.io/github.com/jung-kurt/gofpdf/@v/list: 403 Forbidden

答案1

得分: 1

请检查您的GOPROXY环境变量。

对于模块来说,自从Go 1.13版本以后,应该设置为proxy.golang.org,direct,而不是proxy.github.io

OP Ralph Eichelberger评论中确认,在重新安装Go之后,它可以正常工作。

英文:

Check your GOPROXY environment variable.

For modules, since Go 1.13, it should be proxy.golang.org,direct, not proxy.github.io.

The OP Ralph Eichelberger confirms in the comments it is working, after a fresh re-installation of Go.

huangapple
  • 本文由 发表于 2021年8月30日 14:48:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/68979953.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定