无法导入私有gitlab存储库

我正在尝试将私有gitlab存储库导入到我的Go代码中。 我想使用用户访问令牌进行身份验证。有没有一种方法可以在导入命令中传递访问令牌。

我尝试在import命令中使用基本的oauth2 url,但是import命令仅接受路径。

panxinli8 回答:无法导入私有gitlab存储库

您可以运行命令

git config --global url.git@gitlab.com:.insteadOf https://gitlab.com/

再试一次,它将使用您的git凭据与gitlab一起使用。

例如,您的存储库位于https://gitlab.com/yourname/hello

您跑步

go get gitlab.com/yourname/hello
本文链接:https://www.f2er.com/3154491.html

大家都在问