Go modules, private repos and gopath

前端 未结 3 1271
谎友^
谎友^ 2020-12-16 13:17

We are converting our internal codebase from the dep dependency manager to go modules (vgo or built in with go1.11.2). Imagine we have code like th

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 13:41

    I use a workaround with GITHUB_TOKEN to solve this.

    1. Generate GITHUB_TOKEN here https://github.com/settings/tokens
    2. export GITHUB_TOKEN=xxx
    3. git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/mycompany".insteadOf "https://github.com/mycompany"

提交回复
热议问题