它似乎更像是使用GOINSECURE和
git config --global http.sslverify false
一个我将此 sslVerify 设置为 false,它更进一步..
所以我一直迭代go get github.com/Masterminds/sprig,每次它更进一步......调出另一个网址(可能是包依赖)
go get github.com/Masterminds/sprig
go: golang.org/x/crypto@v0.0.0-20211108221036-ceb1ce70b4fa: unrecognized import path "golang.org/x/crypto": https fetch: Get "https://golang.org/x/cr
ypto?go-get=1": x509: certificate signed by unknown authority
每次我将 url 添加到 GOINSECURE 即
export GOINSECURE=github.com,golang.org
go get github.com/Masterminds/sprig
go: sigs.k8s.io/yaml@v1.2.0: unrecognized import path "sigs.k8s.io/yaml": https fetch: Get "https://sigs.k8s.io/yaml?go-get=1": x509: certificate sig
ned by unknown authority
export GOINSECURE=github.com,golang.org,sigs.k8s.io
直到最终一切都被下载
go get github.com/Masterminds/sprig
go: downloading github.com/Masterminds/sprig v2.22.0+incompatible
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/huandu/xstrings v1.3.2
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa
go: downloading github.com/mitchellh/reflectwalk v1.0.2
""/bin/go build prehelm.go
go: downloading sigs.k8s.io/yaml v1.2.0
go: downloading gopkg.in/yaml.v2 v2.3.0
简而言之,我希望能有所帮助
- 确保你有
git config --global http.sslverify false
- 将站点添加到您 GOINSECURE= 一个一个直到完成。
- 或者,您可以添加
export GOINSECURE=*,但安全性较低