公司内部由于网络问题,无法安装go module,需要配置公司的镜像goproxy:
Linux 下:
export GO111MODULE=on
export GOPROXY=http://mirrors.tools.huawei.com/goproxy/
export GONOSUMDB="*"
windows下:
go env -w GO111MODULE=on
go env -w GOPROXY=http://mirrors.tools.huawei.com/goproxy/
go env -w GONOSUMDB=*
参考:http://3ms.huawei.com/hi/group/3742219/wiki_5822954.html
codehub认证问题
安装来自codehub的依赖时,如果这个依赖又有其他依赖,可能会报如下错误:
go: codehub-y.huawei.com/CloudSOP/GoF2@v1.7.16 requires
codehub-y.huawei.com/gopkgs/gorm-zenith-driver@v0.0.8: reading codehub-y.huawei.com/gopkgs/gorm-zenith-driver/go.mod at revision v0.0.8: git ls-remote -q origin in D:\Go_WorkSpace\pkg\mod\cache\vcs\5f1393b29db4fa94e8d88adef5264fe0c0f46f32a82bb90c7bd1d969ec6eb3a9: exit status 128:
Logon failed, use ctrl+c to cancel basic credential prompt.
Logon failed, use ctrl+c to cancel basic credential prompt.
fatal: could not read Username for 'https://codehub-dg-y.huawei.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.