title: ERROR: Workspace has a .git repository, but it appears to be corrupt
body: <p>I am not able to pull the code from Github through jenkins. I did try to switch the git plugins in jenkins but it didn't work. No idea what the issue is..Some pointers for this would be helpful..
   Am i missing some plugins or ami using plugins with the wrong version?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Started by user anonymous
  Building in workspace /var/lib/jenkins/jobs/TestGitCon/workspace
  Checkout:workspace / /var/lib/jenkins/jobs/TestGitCon/workspace - hudson.remoting.LocalChannel@37ff3f85
  Using strategy: Default
  ERROR: Workspace has a .git repository, but it appears to be corrupt.
  hudson.plugins.git.GitException: Error performing command: usr/bin/git rev-parse --verify HEAD
   at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:904)
   at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:858)
   at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:868)
   at hudson.plugins.git.GitAPI.validateRevision(GitAPI.java:326)
   at hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:125)
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1005)
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:986)
   at hudson.FilePath.act(FilePath.java:981)
   at hudson.FilePath.act(FilePath.java:959)
   at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:986)
   at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1142)
   at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
   at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
   at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
   at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
   at hudson.model.Run.execute(Run.java:1759)
   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
   at hudson.model.ResourceController.execute(ResourceController.java:89)
   at hudson.model.Executor.run(Executor.java:240)
  Caused by: java.io.IOException: Cannot run program "usr/bin/git" (in directory "/var/lib/jenkins/jobs/TestGitCon/workspace"): error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
   at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:244)
   at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:216)
   at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
   at hudson.Launcher$ProcStarter.start(Launcher.java:381)
   at hudson.Launcher$ProcStarter.join(Launcher.java:388)
   at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:885)
   ... 18 more
  Caused by: java.io.IOException: error=2, No such file or directory
   at java.lang.UNIXProcess.forkAndExec(Native Method)
   at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
   at java.lang.ProcessImpl.start(ProcessImpl.java:130)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
   ... 24 more
  Cloning the remote Git repository
  Cloning repository git@github.com:RosettaCommons/main.git
  Error trying to determine the git version: Error performing command: usr/bin/git --version
  Assuming 1.6
  Fetching upstream changes from git@github.com:RosettaCommons/main.git
  ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway.
  hudson.plugins.git.GitException: Error performing command: usr/bin/git fetch -t git@github.com:RosettaCommons/main.git +refs/heads/*:refs/remotes/origin/*
   at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:904)
   at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:858)
   at hudson.plugins.git.GitAPI.fetch(GitAPI.java:200)
   at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1105)
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:986)
   at hudson.FilePath.act(FilePath.java:981)
   at hudson.FilePath.act(FilePath.java:959)
   at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:986)
   at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1142)
   at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
   at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
   at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
   at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
   at hudson.model.Run.execute(Run.java:1759)
   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
   at hudson.model.ResourceController.execute(ResourceController.java:89)
   at hudson.model.Executor.run(Executor.java:240)
  Caused by: java.io.IOException: Cannot run program "usr/bin/git" (in directory "/var/lib/jenkins/jobs/TestGitCon/workspace"): error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
   at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:244)
   at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:216)
   at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
   at hudson.Launcher$ProcStarter.start(Launcher.java:381)
   at hudson.Launcher$ProcStarter.join(Launcher.java:388)
   at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:885)
   ... 17 more
  Caused by: java.io.IOException: error=2, No such file or directory
   at java.lang.UNIXProcess.forkAndExec(Native Method)
   at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
   at java.lang.ProcessImpl.start(ProcessImpl.java:130)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
   ... 23 more
  ERROR: Could not fetch from any repository
  FATAL: Could not fetch from any repository
  hudson.plugins.git.GitException: Could not fetch from any repository
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1076)
   at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:986)
   at hudson.FilePath.act(FilePath.java:981)
   at hudson.FilePath.act(FilePath.java:959)
   at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:986)
   at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1142)
   at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
   at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
   at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
   at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
   at hudson.model.Run.execute(Run.java:1759)
   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
   at hudson.model.ResourceController.execute(ResourceController.java:89)
   at hudson.model.Executor.run(Executor.java:240)</code></pre>
  </div>
  </div>
  </p>