我无法从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
go.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 from desktop
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.
答案 0 :(得分:1)
您需要将Circle CI配置为能够读取其他私有存储库: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?