Go 编译时使用私有仓库
Go 编译时使用私有仓库 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2025/03/27/go-build-with-private-bitbucket/ 使用私有仓库, 无论如何都需要配置 GOPRIVATE 变量 1 2 export GONOSUMDB=git.example.com # comment this line if GOPROXY isn't set export GOPRIVATE=git.example.com 1. 本地开发 在本地开发的时候, 通常使用 ssh 协议进行权限验证。 例如 clone 时地址如下格式如下 1 2 ssh://[email protected]/ ... https://git.example.com/scm/ ... 则执行如下命令替换验证方式 $ git config --global url.ssh://[email protected]/.insteadOf https://git.example.com/scm/ 2. 容器中个编译 在容器中……