国内的go私服
阿里云go私服
使用帮助1.使用go1.11以上版本并开启go module机制
2.导出GOPROXY环境变量
Linux设置GOPROXY环境变量
export GOPROXY=https://mirrors.aliyun.com/goproxy/
`export GOPROXY=https://goproxy.io,direct`
windows设置GOPROXY环境变量
$env:GOPROXY="https://goproxy.cn"
go 私服搭建/配置
使用雅典娜athens搭建私服
(1.)下载代码
git clone https://github.com/gomods/athens
cd github.com/gomods/athens/
(2.)设置环境
export GO111MODULE=on
export GOPROXY="https://proxy.golang.org"
(3.)编译二进制
make build-ver VERSION="0.2.0"
(4.)验证
./athens -version
(5.)修改配置文件,并启动
vim config
StorageType = "disk"
[Storage.Disk]
# RootPath is the Athens Disk Root folder
# Env override: ATHENS_DISK_STORAGE_ROOT
RootPath = "/root/athens/disk"
//启动
./athens -config_file=./config.dev.toml &
(6.)设置代理
//export GOPROXY=http://127.0.0.1:3000
export GOPROXY=http://localhost:3000 && go get module@v1
雅典娜官方文档
雅典娜私服部署
企业级开源仓库nexus3实战应用–go1.12与1.14之私服使用的差异与变化
nexus 做go的私服
https://www.jianshu.com/p/cdad7d4639e3
使用gitlab做go mod私服
http://t.zoukankan.com/tomtellyou-p-14411214.html