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.

  • This could be a bug in the bitbucket plugin bitbucket plugin version: 1.0 Git plugin version: 2.2.1 Jenkins version: 1.532.2.3 See stackoverflow question: http://stackoverflow.com/questions/23203806/cloudbees-prebuild-merge-no-longer-works If I configure a job to do a merge before the build then let SCM trigger the job it does not do a merge before the build. Since I have also turned on the git publisher the push fails because the target branch has diverged. The build is supposed to merge the source branch and the target branch together and push it back to target. If I kick off the build manually the the merge is done before the build and the git publisher runs without error. Approximate steps to reproduce. Create job named mergeAndBuild Configure mergeAndBuild to use git Configure mergeAndBuild to look for changes on sourceBranch and targetBranch Add merge before build to git configuration Name of repository: Origin Branch to merge to: targetBranch Merge strategy: default Enable bitbucket build trigger. Add git publisher to the build Push Only If Build Succeeds: yes Merge Results: yes Make sure the bitbucket hook is configured with your jenkins server. Then do something like the following git clone giturl git checkout -b sourceBranch touch sourceBranch.txt git add sourceBranch.txt git commit -m "Add sourceBranch.txt" git checkout master git checkout -b targetBranch touch targetBranch.txt git add targetBranch.txt git commit -m "Add targetBranch.txT" git push origin targetBranch:targetBranch git push origin sourceBranch:sourceBranch At this point it will build and the log will say: commit notification 6161e4adb567c8be106ee8fa70594d67a756e481 Building remotely on 5a988271 in workspace /scratch/jenkins/workspace/da/b2.potter Fetching changes from the remote Git repository Fetching upstream changes from git@bitbucket.org:elosystemsteam/paypoint-potter.git Checking out Revision 6161e4adb567c8be106ee8fa70594d67a756e481 (detached) Then towards then end when the git publisher tries to push: Pushing HEAD to branch B2-Bisque of origin repository ERROR: Failed to push merge to origin repository hudson.plugins.git.GitException: Command "git push git@bitbucket.org:elosystemsteam/paypoint-potter.git HEAD:B2-Bisque" returned status code 1: stdout: stderr: To git@bitbucket.org:elosystemsteam/paypoint-potter.git ! [rejected] HEAD -> B2-Bisque (non-fast-forward) error: failed to push some refs to 'git@bitbucket.org:elosystemsteam/paypoint-potter.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and merge the remote changes hint: (e.g. 'git pull') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146)
    via by Michael Power,
  • This could be a bug in the bitbucket plugin bitbucket plugin version: 1.0 Git plugin version: 2.2.1 Jenkins version: 1.532.2.3 See stackoverflow question: http://stackoverflow.com/questions/23203806/cloudbees-prebuild-merge-no-longer-works If I configure a job to do a merge before the build then let SCM trigger the job it does not do a merge before the build. Since I have also turned on the git publisher the push fails because the target branch has diverged. The build is supposed to merge the source branch and the target branch together and push it back to target. If I kick off the build manually the the merge is done before the build and the git publisher runs without error. Approximate steps to reproduce. Create job named mergeAndBuild Configure mergeAndBuild to use git Configure mergeAndBuild to look for changes on sourceBranch and targetBranch Add merge before build to git configuration Name of repository: Origin Branch to merge to: targetBranch Merge strategy: default Enable bitbucket build trigger. Add git publisher to the build Push Only If Build Succeeds: yes Merge Results: yes Make sure the bitbucket hook is configured with your jenkins server. Then do something like the following git clone giturl git checkout -b sourceBranch touch sourceBranch.txt git add sourceBranch.txt git commit -m "Add sourceBranch.txt" git checkout master git checkout -b targetBranch touch targetBranch.txt git add targetBranch.txt git commit -m "Add targetBranch.txT" git push origin targetBranch:targetBranch git push origin sourceBranch:sourceBranch At this point it will build and the log will say: commit notification 6161e4adb567c8be106ee8fa70594d67a756e481 Building remotely on 5a988271 in workspace /scratch/jenkins/workspace/da/b2.potter Fetching changes from the remote Git repository Fetching upstream changes from git@bitbucket.org:elosystemsteam/paypoint-potter.git Checking out Revision 6161e4adb567c8be106ee8fa70594d67a756e481 (detached) Then towards then end when the git publisher tries to push: Pushing HEAD to branch B2-Bisque of origin repository ERROR: Failed to push merge to origin repository hudson.plugins.git.GitException: Command "git push git@bitbucket.org:elosystemsteam/paypoint-potter.git HEAD:B2-Bisque" returned status code 1: stdout: stderr: To git@bitbucket.org:elosystemsteam/paypoint-potter.git ! [rejected] HEAD -> B2-Bisque (non-fast-forward) error: failed to push some refs to 'git@bitbucket.org:elosystemsteam/paypoint-potter.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and merge the remote changes hint: (e.g. 'git pull') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146)
    via by Michael Power,
  • FlightGear - Flight Simulator / Mailing Lists
    via by Unknown author,
  • Used to work on git 2.2.1. After upgrading to 2.2.7, it cannot work on Linux slave. But can work on windows slave. Errors from polling log: Started on Oct 21, 2014 10:31:00 PM Polling SCM changes on VM-Platuypus-Build-10.110.61.85-PDK Using strategy: Default [poll] Last Built Revision: Revision cd2cd96d9ff5f3ca90ead6178f299a873978a44c (origin/master) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repositories > git config remote.origin.url ssh://bmcdiags@10.110.61.117:30000/platypus.git # timeout=10 Fetching upstream changes from ssh://bmcdiags@10.110.61.117:30000/platypus.git > git --version # timeout=10 > git fetch --tags ssh://bmcdiags@10.110.61.117:30000/platypus.git +refs/heads/*:refs/remotes/origin/* # timeout=20 FATAL: hudson.plugins.git.GitException: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:475) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1449) at hudson.model.AbstractProject._poll(AbstractProject.java:1420) at hudson.model.AbstractProject.poll(AbstractProject.java:1331) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:477) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:506) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.plugins.git.GitException: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:647) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:554) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:473) ... 13 more Caused by: hudson.plugins.git.GitException: Command "git fetch --tags ssh://bmcdiags@10.110.61.117:30000/platypus.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: error: cannot run ssh: No such file or directory fatal: unable to fork at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1435) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1223) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) 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:701) Done. Took 0.15 sec No changes
    via by sharon xia,
    • hudson.plugins.git.GitException: Command "/opt/app/git/1.9.0-0.14/bin/git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: I don't handle protocol 'git clone ssh' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1745) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1489)

    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