Skip to main content

Gitlab Repository

Go Proxy

# 建议隔离环境配置
cat "$(go env GOENV)"
go env GOENV

go env -w GOPROXY='https://gitlab.com/api/v4/projects/1234/packages/go,https://goproxy.io,direct'
go env -w GONOSUMDB='gitlab.com/my/project,<previous value>'
~/.netrc
machine gitlab.com login <username> password <token>
# 测试 token
curl -u "user:token" https://server/api/v4/projects/:id/repository/archive.zip