Download the code from github
server端#
go list (go mod tidy)
Error:
go: github.com/casbin/casbin/[email protected]: Get "https://proxy.golang.org/github.com/casbin/casbin/v2/@v/v2.11.0.mod": dial tcp 34.64.4.81:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
solution:
go env
Find set GOSUMDB to see if set GOSUMDB = sum.golang.org
If yes, turn it off
go env -w GOSUMDB=off
Modify agent
go env -w GOPROXY=https://goproxy.cn,direct
再次 go list (go mod tidy)