git - 从 Git : "One of setGitDir or setWorkTree must be called" checkout 时出现 Hudson 错误

标签 git hudson

当我尝试从 Hudson 上的 GIT 构建项目时遇到错误。该项目位于 GitHub 中,如果这可能有所作为的话。

错误是:

FATAL: One of setGitDir or setWorkTree must be called.

我无法在网上或 StackOverflow 上找到有关如何处理此问题的任何有用信息。我什至不知道从哪里开始解决这个问题。

这是完整的控制台输出:

Started by user anonymous
Checkout:workspace / D:\Hudson\jobs\{Name of App}\workspace - hudson.remoting.LocalChannel@1c2a5b50
Using strategy: Default
Checkout:workspace / D:\Hudson\jobs\{Name of App}\workspace - hudson.remoting.LocalChannel@1c2a5b50
FATAL: One of setGitDir or setWorkTree must be called.
java.lang.IllegalArgumentException: One of setGitDir or setWorkTree must be called.
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree(BaseRepositoryBuilder.java:538)
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.setup(BaseRepositoryBuilder.java:506)
    at org.eclipse.jgit.storage.file.FileRepositoryBuilder.build(FileRepositoryBuilder.java:89)
    at hudson.plugins.git.GitAPI.<init>(GitAPI.java:92)
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:897)
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
    at hudson.FilePath.act(FilePath.java:791)
    at hudson.FilePath.act(FilePath.java:773)
    at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:668)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1515)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:521)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:428)
    at hudson.model.Run.run(Run.java:1390)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:40)
    at hudson.model.ResourceController.execute(ResourceController.java:82)
    at hudson.model.Executor.run(Executor.java:137)

以下是显示我如何使用 GIT 配置项目的屏幕截图:

enter image description here enter image description here

最佳答案

嗯。不知道为什么这解决了它,但我能够通过删除工作区

使错误消失。

关于git - 从 Git : "One of setGitDir or setWorkTree must be called" checkout 时出现 Hudson 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19143534/

相关文章:

linux - 认证失败

eclipse - 持续集成和eclipse插件开发

jenkins - hudson CI : how to delete all jobs?

continuous-integration - 无法使用 Hudson 的 MSBuild 插件获得正确的 msbuild.exe 路径

git - 理解 git commit --only 和 pre-commit 钩子(Hook)

git - 无法使用第二个个人 github 帐户进行 Git 克隆

git - "diff --git"中输出的 "git diff"指的是什么?

将 core.logAllRefUpdates 设置为 true 的裸存储库中的 git reflog 不返回任何内容

git - 如何在没有 SSH 或密码的情况下访问 'git pull'?

delphi - hudson 的 dunit 测试结果消息