问题描述
要兑现go依赖项,我使用nexus(作为goproxy)连接到goproxy
服务器(因为nexus
无法直接从{ {1}})在专用网络之外。
nexus.some.repo.com:4443/存储库/ go-nexus-proxy➡️gonexus.dev nexus.some.repo.com:4443/repository/go-proxy➡️proxy.golang.org ...
GitHub
我使用goproxy="nexus.some.repo.com:4443/repository/go-proxy,nexus.some.repo.com:4443/repository/go-nexus-proxy"
文件连接到nexus
.netrc
我可以使用machine nexus.some.repo.com:4443
login SOME_LOGIN
password SOME_PASS
protocol https
代替git credential.helper
❓
如果是??如何配置.netrc
❓
解决方法
如果您已经在使用netrc,则只需将凭据帮助程序配置为使用netrc
您可以下载并放入PATH git-credential-netrc.perl
然后:
git config --global credential.helper netrc