git - 我无法从 CircleCi 上的多个存储库中克隆

标签 git go circleci go-packages

我无法从 CircleCi 下载我新发布的 go 包。在本地它有效。
我可以通过访问来验证我尝试使用的标签是否可用
https://github.com/acme/my-lib/tree/v0.0.3

但是,go get不会下载它。

我有 GOPRIVATE=github.com/acme/我也试过 github.com/acme/*也,同样的结果。

运行go get返回这个

go: finding github.com/acme/my-lib v0.0.3
go: github.com/acme/my-lib@v0.0.3: unknown revision v0.0.3
go: error loading module requirements

去.mod
module github.com/acme/project

require (
          github.com/acme/my-lib v0.0.3
)

为什么从 CircleCi 运行时无法识别我的标记版本

我也试过改变我的.git/config :
[remote "origin"]
        # url = git@github.com:acme/my-lib.git
        url = https://github.com/acme/my-lib.git

https 或 ssh 都不起作用。

来自桌面的 git ls-remote
git ls-remote https://github.com/acme/my-lib | ack v0.0.3
$SHA        refs/tags/v0.0.3

来自circleci的git ls-remote
git ls-remote https://github.com/acme/my-lib | grep v0.0.3
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

最佳答案

您需要配置 Circle CI 才能读取其他私有(private)存储库:https://circleci.com/docs/2.0/gh-bb-integration/#enable-your-project-to-check-out-additional-private-repositories ?

为了能够创建可重现的构建,您是否考虑过在/acme/project 中进行销售:https://tip.golang.org/cmd/go/#hdr-Modules_and_vendoring ?

关于git - 我无法从 CircleCi 上的多个存储库中克隆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58953315/

相关文章:

Git 服务器端 Hook 未触发 - 如何检查

git - git add 后文件未显示在 git diff 中。我怎么知道它会被提交?

git - 由于电子邮件验证而无法推送到 github

floating-point - 常量截断为整数

git - 如何使用带参数的嵌套命令创建 Git 别名?

Go test <function> 返回 undefined : <function>

android - CircleCI ./gradlew : Permission denied

mysql - 无法通过套接字 '/var/run/mysqld/mysqld.sock Circle Ci/Rails/Mysql 连接到本地 MySQL 服务器

GitHub - 提交者阻止合并 PR

mysql - 安装 dbweb 时没有远程存储库