hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution fatal: The remote end hung up unexpectedly

Jenkins JIRA | Sampo Niskanen | 3 years ago
  1. 0

    We have Jenkins set up in our intranet to poll a Bitbucket Git repository every minute. Last night our network went down so that the Git polling managed to see a change in Git, but when the job started Bitbucket was unavailable and fetching the repository failed. After this every minute even though the Git polling failed, it launched the job (which consequently failed as well). During the night it caused 1000 failed builds. If the Git polling cannot connect to the Git repository, it should not start the job. Polling log from a failed build (not the first one): Started on Aug 5, 2013 6:14:55 PM Using strategy: Default [poll] Last Built Revision: Revision [removed] (origin/feature/[removed]) Fetching changes from the remote Git repositories Fetching upstream changes from origin ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution fatal: The remote end hung up unexpectedly 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:793) at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:723) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:706) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) Polling for changes in Done. Took 5.1 sec Changes found

    Jenkins JIRA | 3 years ago | Sampo Niskanen
    hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution fatal: The remote end hung up unexpectedly
  2. 0

    Jenkins users - ssh-agent plugin problems

    nabble.com | 5 months ago
    hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
  3. 0

    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}

    Jenkins JIRA | 3 years ago | Karl Ostmo
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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}

    Jenkins JIRA | 3 years ago | Karl Ostmo
    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
  6. 0

    Jenkins time-out while fetching from Github in 10 mins.

    Stack Overflow | 3 years ago | user2481891
    hudson.plugins.git.GitException: Failed to fetch from git@github.com:MyOrg/projectgroup/project1

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution fatal: The remote end hung up unexpectedly

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.fetch
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161)
      3 frames
    3. Hudson GIT plugin
      GitSCM$1.invoke
      1. hudson.plugins.git.GitAPI.fetch(GitAPI.java:230)
      2. hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:793)
      3. hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
      4. hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:723)
      5. hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:706)
      5 frames
    4. Hudson
      FilePath$FileCallableWrapper.call
      1. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
      1 frame
    5. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:326)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      5. java.lang.Thread.run(Thread.java:679)
      5 frames