0

当您的 go.mod 文件中有私有存储库时,当您有私有存储库时如何运行 bazel gelelle update-repo 命令

❯ bazel run //:gazelle -- update-repos -from_file=search/go.mod
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:gazelle up-to-date:
  bazel-bin/gazelle-runner.bash
  bazel-bin/gazelle
INFO: Elapsed time: 0.231s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
go: bitbucket.org/blah/backend-components/go-logging@v1.0.5/go.mod: verifying module: bitbucket.org/blah/backend-components/go-logging@v1.0.5/go.mod: reading https://sum.golang.org/lookup/bitbucket.org/blah/backend-components/go-logging@v1.0.5: 410 Gone
        server response:
        not found: bitbucket.org/blah/backend-components/go-logging@v1.0.5: reading https://api.bitbucket.org/2.0/repositories/blah/backend-components?fields=scm: 403 Forbidden
                server response: Access denied. You must have write or admin access.
gazelle: exit status 1
4

1 回答 1

0

我在文档中找不到它,但是您将环境变量 GOPRIVATE 设置为以逗号分隔的类似模块的模式列表。例如:

export GOPRIVATE='github.com/mycompany/myrepo,*.example.com'
于 2020-10-08T02:15:25.780 回答