go mod tidy 設置私有庫不走代理

windows:

set GOPRIVATE=gitlab.xx.com
set GOPROXY=https://goproxy.cn
set GONOPROXY=gitlab.xx.com
set GONOSUMDB=gitlab.xx.com

mac

export  GOPRIVATE="gitlab.xx.com"
export  GOPROXY="https://goproxy.cn"
export  GONOPROXY="gitlab.xx.com"
export  GONOSUMDB="gitlab.xx.com"

否則:將 goproxy.cn加到前面

 reading https://goproxy.cn/gitlab.xx.com/jxy/backend_common/@v/v0.0.0-20200313123728-2fe9c6b2d83f.mod  有這樣的地址嗎

 

go mod tidy 成功之後,關掉IDE或  go build下,飄紅纔會消失

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章