【问题标题】:git credential.helper instead of .netrc to get go dependenciesgit credential.helper 而不是 .netrc 来获取依赖项
【发布时间】:2021-02-10 14:12:49
【问题描述】:

为了兑现 依赖项,我使用(作为)连接到专用网络之外的goproxy 服务器(因为nexus 无法直接从GitHub 获取依赖项)。


nexus.some.repo.com:4443/repository/go-nexus-proxy ➡️ gonexus.dev nexus.some.repo.com:4443/repository/go-proxy ➡️proxy.golang.org ...


GOPROXY="nexus.some.repo.com:4443/repository/go-proxy,nexus.some.repo.com:4443/repository/go-nexus-proxy"

我使用.netrc文件连接到

machine nexus.some.repo.com:4443 
login SOME_LOGIN 
password SOME_PASS 
protocol https

我可以用git credential.helper 代替.netrc

如果 ????????如何配置git credential.helper

【问题讨论】:

    标签: go nexus goproxy nexus go nexus go-get git-credential-manager go-git


    【解决方案1】:

    如果您已经在使用 netrc,您可以简单地配置凭证助手以使用 netrc

    您可以下载并放入您的PATH git-credential-netrc.perl

    然后:

    git config --global credential.helper netrc
    

    【讨论】:

    猜你喜欢
    • 2022-06-23
    • 2021-01-01
    • 1970-01-01
    • 2021-07-03
    • 2021-12-27
    • 1970-01-01
    • 2016-10-24
    • 1970-01-01
    • 2011-04-06
    相关资源
    最近更新 更多