首页 > 技术文章 > 从GitLab使用go get

wangruixing 2020-10-13 10:27 原文

使用私有仓库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

推荐阅读