从 jenkins 构建 git 项目时,它显示了一个错误,例如找不到任何要构建的修订版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22031862/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 09:46:07  来源:igfitidea点击:

While building a git project from jenkins it shows an error like couldn't find any revision to build

gitsvntestingjenkins

提问by Tony Davis

While trying to build a git project through jenkins it gives an error 'ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Finished: FAILURE' What does this error means and what should I do to remove it?

在尝试通过 jenkins 构建 git 项目时,它给出了一个错误“错误:找不到任何要构建的修订版”。验证此作业的存储库和分支配置。Finished: FAILURE' 这个错误是什么意思,我应该怎么做才能删除它?

采纳答案by VonC

I confirm: an empty repo has no HEAD, and no branch. I mention this in "Why do I need to explicitly push a new branch?"

我确认:一个空的 repo 没有 HEAD,也没有分支。我在“为什么我需要明确推送一个新分支?”中提到了这一点。

That means Jenkins, once the repo is clonedwon't be able to checkout a branch (since there is none yet).

这意味着 Jenkins,一旦 repo 被克隆,将无法检出分支(因为还没有分支)。