title: Hudson error when checking out from Git: "One of setGitDir or setWorkTree must be called"
body: <p>I'm getting an error when I attempt to build a project from GIT on Hudson.  The project is in GitHub, if that might make a difference.</p>
  
  <p>The error is:</p>
  
  <pre><code>FATAL: One of setGitDir or setWorkTree must be called.
  </code></pre>
  
  <p>I haven't been able to find any useful information online or on StackOverflow for how to deal with this.  I don't even know where to begin to figure this out.</p>
  
  <p>This is the full console output:</p>
  
  <pre><code>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.&lt;init&gt;(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)
  </code></pre>
  
  <p>Here are screen shots showing how I have the project configured with GIT:</p>
  
  <p><img src="https://i.stack.imgur.com/AR6Nm.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/vER7c.png" alt="enter image description here"></p>