我无法从 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/