Go Module Get Private Repository

2020-06-01  本文已影响0人  七秒钟回忆待续

go version go1.14

  1. go env -w GOPRIVATE=bitbucket.org
  2. git config url."ssh://git@bitbucket.org/xxx".insteadOf "https://bitbucket.org/xxx"
  3. go mod edit -require=bitbucket.org/xxx/repo@xx-revision
  4. go mod download

参考文章:

  1. https://blog.golang.org/using-go-modules
  2. https://github.com/golang/go/wiki/Modules
上一篇下一篇

猜你喜欢

热点阅读