一般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協議去訪問私庫了。