hudson.plugins.git.GitException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • If a user renames a branch in such a way that a *file* somewhere underneath {{.git/refs/heads}} becomes a *directory*, or vice versa, Jenkins fails to update the branch list (see error output below). Jenkins is not able to recover from this on its own; we are forced to click on "Wipe Out Current Workspace" for every job. {CODE}hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 1: stdout: stderr: error: unable to resolve reference refs/remotes/origin/foo/bar/blah: Not a directory From ssh://stash.teslamotors.com:7999/FW/firmware ! [new branch] foo/bar/blah -> origin/foo/bar/blah (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:796) at hudson.plugins.git.GitSCM.access$000(GitSCM.java:60) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:988) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:953) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) ERROR: Could not fetch from any repository{CODE}
    via by Karl Ostmo,
  • If a user renames a branch in such a way that a *file* somewhere underneath {{.git/refs/heads}} becomes a *directory*, or vice versa, Jenkins fails to update the branch list (see error output below). Jenkins is not able to recover from this on its own; we are forced to click on "Wipe Out Current Workspace" for every job. {CODE}hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 1: stdout: stderr: error: unable to resolve reference refs/remotes/origin/foo/bar/blah: Not a directory From ssh://stash.teslamotors.com:7999/FW/firmware ! [new branch] foo/bar/blah -> origin/foo/bar/blah (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:796) at hudson.plugins.git.GitSCM.access$000(GitSCM.java:60) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:988) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:953) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) ERROR: Could not fetch from any repository{CODE}
    via by Karl Ostmo,
  • GeoServer developers' list ()
    via by Unknown author,
  • I have a project configured with two remotes. One uses SSH and the other uses HTTPS: ssh://site-user@platinum.example.org/opt/site https://git.example.org/site.git Both of these work from the command-line (e.g. "git clone …") and both worked with 1.1.26. With 1.2, only the SSH remote is added (e.g. "git remote show" will only list that remote – and it's always the SSH remote, no matter what order I create the remotes in the config. Builds will fail with this error: {noformat} git --version git version 1.8.1.5 Fetching upstream changes from ssh-remote Fetching upstream changes from https-remote ERROR: Problem fetching from https-remote / https-remote - could be unavailable. Continuing anyway. hudson.plugins.git.GitException: Command "git fetch -t https-remote +refs/heads/*:refs/remotes/https-remote/*" returned status code 128: stdout: stderr: fatal: 'https-remote' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:160) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1023) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:941) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1113) at hudson.model.AbstractProject.checkout(AbstractProject.java:1342) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588) at hudson.model.Run.execute(Run.java:1567) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) {noformat} I've reverted back to 1.1.26 for the moment.
    via by acdha,
  • I have a project configured with two remotes. One uses SSH and the other uses HTTPS: ssh://site-user@platinum.example.org/opt/site https://git.example.org/site.git Both of these work from the command-line (e.g. "git clone …") and both worked with 1.1.26. With 1.2, only the SSH remote is added (e.g. "git remote show" will only list that remote – and it's always the SSH remote, no matter what order I create the remotes in the config. Builds will fail with this error: {noformat} git --version git version 1.8.1.5 Fetching upstream changes from ssh-remote Fetching upstream changes from https-remote ERROR: Problem fetching from https-remote / https-remote - could be unavailable. Continuing anyway. hudson.plugins.git.GitException: Command "git fetch -t https-remote +refs/heads/*:refs/remotes/https-remote/*" returned status code 128: stdout: stderr: fatal: 'https-remote' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:160) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1023) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:941) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1113) at hudson.model.AbstractProject.checkout(AbstractProject.java:1342) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588) at hudson.model.Run.execute(Run.java:1567) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) {noformat} I've reverted back to 1.1.26 for the moment.
    via by acdha,
  • Build failed in Jenkins: Stan Header Tests #33
    via by Unknown author,
    • hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 1: stdout: stderr: error: unable to resolve reference refs/remotes/origin/foo/bar/blah: Not a directory From ssh://stash.teslamotors.com:7999/FW/firmware ! [new branch] foo/bar/blah -> origin/foo/bar/blah (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:796) at hudson.plugins.git.GitSCM.access$000(GitSCM.java:60) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:988) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:953) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2 more bugmates