go mod 使用私有gitlab群组的解决方案
如果使用gitlab 的仓库作为go mode 私有库 ,会遇到go mod tidy会报错说gitlab 仓库会有问题拉不下来我们需要配置gitlab的https为sshgit config --global url."git@gitlab.com:".insteadOf https://gitlab.com/也可以获取具体的分支在go mod修改replace gitlab.com/YourG
·
如果使用gitlab 的仓库作为go mode 私有库 ,会遇到
go mod tidy
会报错说gitlab 仓库会有问题拉不下来
我们需要配置gitlab的https为ssh
git config --global url."git@gitlab.com:".insteadOf https://gitlab.com/
也可以获取具体的分支在go mod修改
replace gitlab.com/YourGroup/SubGroup/Project => gitlab.com/YourGroup/SubGroup/Project.git master
设置noproxy 域名
go env -w GONOPROXY=\*\*.gitlab.com\*\*
设置private
go env -w GOPRIVATE=\*\*.gitlab.com\*\*
更多推荐
已为社区贡献3条内容
所有评论(0)