Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20231

Wipe out repository & force clone option is broken since GIT plugin version 2.0

    Details

    • Similar Issues:

      Description

      When using the "Wipe out repository & force clone" option after upgrade to GIT plugin version 2.0 jobs fail with the error "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.".

      We are seeing this issue on multiple Jenkins installations in combination with the Gerrit Trigger plugin.

      Example job log:

      Triggered by Gerrit: https://.../12345
      Building remotely on .. in workspace /.../job_name
      Wiping out workspace first.
      Cloning the remote Git repository
      Cloning repository ssh://...:29418/...
      git --version
      git version 1.8.4
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            jpschewe jpschewe added a comment -

            Manually wiping out a workspace and trying to clone again is broken too. I'm using Jenkins 1.509.4 with git plugin 2.0 and I can't get the repository to clone because of this error:

            16:14:02 Started by user Jon Schewe
            16:14:02 Building in workspace /home/hudson/.hudson/jobs/fll-sw-feature-branches/workspace
            16:14:02 Pruning obsolete local branches
            16:14:02 FATAL: Command "git config --get remote.origin.url" returned status code 1:
            16:14:02 stdout:
            16:14:02 stderr:
            16:14:02 hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1:
            16:14:02 stdout:
            16:14:02 stderr:
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099)
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1076)
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:917)
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:927)
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:656)
            16:14:02 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)
            16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:446)
            16:14:02 at hudson.plugins.git.extensions.impl.PruneStaleBranch.beforeCheckout(PruneStaleBranch.java:31)
            16:14:02 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:858)
            16:14:02 at hudson.model.AbstractProject.checkout(AbstractProject.java:1376)
            16:14:02 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655)
            16:14:02 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
            16:14:02 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)
            16:14:02 at hudson.model.Run.execute(Run.java:1592)
            16:14:02 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
            16:14:02 at hudson.model.ResourceController.execute(ResourceController.java:88)
            16:14:02 at hudson.model.Executor.run(Executor.java:237)

            Show
            jpschewe jpschewe added a comment - Manually wiping out a workspace and trying to clone again is broken too. I'm using Jenkins 1.509.4 with git plugin 2.0 and I can't get the repository to clone because of this error: 16:14:02 Started by user Jon Schewe 16:14:02 Building in workspace /home/hudson/.hudson/jobs/fll-sw-feature-branches/workspace 16:14:02 Pruning obsolete local branches 16:14:02 FATAL: Command "git config --get remote.origin.url" returned status code 1: 16:14:02 stdout: 16:14:02 stderr: 16:14:02 hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: 16:14:02 stdout: 16:14:02 stderr: 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099) 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1076) 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:917) 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:927) 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:656) 16:14:02 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61) 16:14:02 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:446) 16:14:02 at hudson.plugins.git.extensions.impl.PruneStaleBranch.beforeCheckout(PruneStaleBranch.java:31) 16:14:02 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:858) 16:14:02 at hudson.model.AbstractProject.checkout(AbstractProject.java:1376) 16:14:02 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655) 16:14:02 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) 16:14:02 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560) 16:14:02 at hudson.model.Run.execute(Run.java:1592) 16:14:02 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 16:14:02 at hudson.model.ResourceController.execute(ResourceController.java:88) 16:14:02 at hudson.model.Executor.run(Executor.java:237)
            Hide
            jpschewe jpschewe added a comment - - edited

            Any chance this can get fixed soon? This seems like a pretty basic problem.

            Show
            jpschewe jpschewe added a comment - - edited Any chance this can get fixed soon? This seems like a pretty basic problem.
            Hide
            markewaite Mark Waite added a comment -

            This problem is resolved for non-windows machines in git-client-plugin 1.6.2, available from the update center. I was able to create a job which uses JGit or command line git and wipes the workspace successfully.

            The command line git implementation also works to wipe the workspace on Windows.

            The JGit implementation does not wipe the workspace on Windows due to JENKINS-19994 .

            Show
            markewaite Mark Waite added a comment - This problem is resolved for non-windows machines in git-client-plugin 1.6.2, available from the update center. I was able to create a job which uses JGit or command line git and wipes the workspace successfully. The command line git implementation also works to wipe the workspace on Windows. The JGit implementation does not wipe the workspace on Windows due to JENKINS-19994 .
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git-client-plugin 1.6.2

            Show
            markewaite Mark Waite added a comment - Fixed in git-client-plugin 1.6.2
            Hide
            hnygard Hallvard Nygård added a comment -

            I wiped the workspace and retriggered a build. Did not get the issue on the first attempt with plugin version 1.6.3.

            Show
            hnygard Hallvard Nygård added a comment - I wiped the workspace and retriggered a build. Did not get the issue on the first attempt with plugin version 1.6.3.

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                epkabeg Andréas Berg
              • Votes:
                10 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: