一般go get私有仓库时会出现如下错误:
go: xxx@v0.0.0-20190918102752-bb51b27911ca: unrecognized import path "xxx" (https fetch: Get https://xxx?go-get=1: x509: certificate signed by unknown authority)
原因是go get的执行过程需要https证书,检查server端证书是未知CA签署的并报错。
- 解决方法:
go get -insecure xxx
这样go get就会通过http协议去访问私库了。