从GitLab使用go get


使用私有仓库gitlab进行go依赖管理(go mod / go get)

// 编辑git配置文件 ~/.gitconfig
[url "git@gitlab.***.com:"]
    insteadOf = https://gitlab.***.com   

// 配置环境变量
GOPRIVATE=gitlab.***.com

// gitlab普通版本只能get2层
// 注意 common为gitlab的群组
gitlab.***.com/common/config  //称之为2层

// config 包的go.mod注意module名字
module gitlab.***.com/common/config


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM