go build x509: certificate has expired or is not yet valid
一般go get私有仓库时会出现如下错误:
build XXXXXXXXXX/cmd/main: cannot load XXXXXXXXXXX: unrecognized import path "XXX" (https fetch: Get https://XXXX?go-get=1: x509: certificate has expired or is not yet valid
原因是go get的执行过程需要https证书,检查server端证书是未知CA签署的并报错。
解决方法:go get -insecure xxx
这样go get就会通过http协议去访问私库了。