美文网首页
go get gitlab私有仓库

go get gitlab私有仓库

作者: 张广旭 | 来源:发表于2020-08-25 16:20 被阅读0次

修改 ~/.gitconfig

[url "git@gitlab.com:"]
        insteadOf = https://gitlab.com/

git token

  • 创建一个token: XXXXXXXXXXXXXX
  • 设置权限: read_repository
  • git config --global http.extraheader "PRIVATE-TOKEN:XXXXXXXXXXXXXX"

如果还是不行,配上gitlab.com登录的用户名和密码,修改 ~/.netrc:

machine gitlab.com
    login xxxxx
    password xxxxxxxxxxxxxxxxxx

相关文章

网友评论

      本文标题:go get gitlab私有仓库

      本文链接:https://www.haomeiwen.com/subject/nvjzjktx.html