首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >How to bazel gazelle --update-repos with private repository

How to bazel gazelle --update-repos with private repository
EN

Stack Overflow用户
提问于 2020-09-07 08:53:51
回答 1查看 938关注 0票数 0

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

代码语言:javascript
复制
❯ 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
EN

回答 1

Stack Overflow用户

发布于 2020-10-08 10:15:26

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

代码语言:javascript
复制
export GOPRIVATE='github.com/mycompany/myrepo,*.example.com'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63770173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档