1.完整报错信息
For more information, see 'go help module-auth'.
go: github.com/oam-dev/kubevela/hack/utils imports
helm.sh/helm/v3/pkg/action imports
helm.sh/helm/v3/pkg/registry imports
oras.land/oras-go/pkg/content imports
github.com/containerd/containerd/content/local tested by
github.com/containerd/containerd/content/local.test imports
github.com/containerd/containerd/pkg/testutil imports
github.com/containerd/containerd/mount imports
github.com/moby/sys/mountinfo: github.com/openkruise/kruise-api@v1.4.0: verifying go.mod: checksum mismatch
downloaded: h1:+ibyZ6fmo5cKJNY43agDSWoeo9iQmIYl0JocEy+rgTk=
sum.golang.org: h1:HyRlDV0MfW5Zm+3g36bx7u4CcWHcKBxL8g/c/2bjcd4=
SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
2. 解决方案
从网上检索来看,主要有两种解决方式
-
方式1:
执行go clean -modcache,然后删除go.sum后重新尝试
参考:Go modules: checksum mismatch -
方式2:(这个方式解决了我的问题)
切换go proxy,
参考:go.sum are different when using go mod vendor/download(go.sum checksum mismatch
#window下执行的命令
go env -w GOPROXY=https://goproxy.cn