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

Git client fails to remove files/directories with "git clean -fdx"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • git-client-plugin
    • None
    • OS: Windows 2008 R2
      Java: 1.6.0_26
      Jenkins: 1.547
      Git client: Newest (1.6.1)
      Other plugins: All are updated, like Git (2.0.1)

      Jenkins is running as Windows service, with Local system account

      This all has worked fine previously, but latest updates for some reason there have been these kind of issues, as described below.

      1. Start Jenkins service
      2. Trigger ex. 20 builds
      3. Wait and see if one of them fails to build
      4. See if the reason is Jenkins issue, not msbuild/unit test
      5. Rest of builds that starts after failed one, will fail also with same output as below
      6. Wipe workspaces manually
      7. Builds will most likely start working again

      Triggered by Gerrit: http://xxx002:8080/4195
      [EnvInject] - Loading node environment variables.
      Building on master in workspace r:\jenkins-workspaces
      Fetching changes from the remote Git repository
      Fetching upstream changes from ssh://hudson@xxxx002:29418/xxx.git
      Checking out Revision 45d62ed078309607e0b6a24b842ff33c93f3b740 (feature/WI3076)
      Cleaning workspace
      Resetting working tree
      FATAL: Command "git clean -fdx" returned status code 1:
      stdout: Removing Source/xxx/zzz/Areas
      Removing Source/xxx/zzz/Content
      Removing Source/xxx/zzz/Scripts
      Removing Source/xxx/zzz/Views

      stderr: warning: failed to remove Source/xxx/zzz/Areas
      warning: failed to remove Source/xxx/zzz/Content
      warning: failed to remove Source/xxx/zzz/Scripts
      warning: failed to remove Source/xxx/zzz/Views

      hudson.plugins.git.GitException: Command "git clean -fdx" returned status code 1:
      stdout: Removing Source/xxx/zzz/Areas
      Removing Source/xxx/zzz/Content
      Removing Source/xxx/zzz/Scripts
      Removing Source/xxx/zzz/Views

      stderr: warning: failed to remove Source/xxx/zzz/Areas
      warning: failed to remove Source/xxx/zzz/Content
      warning: failed to remove Source/xxx/zzz/Scripts
      warning: failed to remove Source/xxx/zzz/Views

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1086)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1063)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:900)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:910)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clean(CliGitAPIImpl.java:367)
      at hudson.plugins.git.GitAPI.clean(GitAPI.java:251)
      at hudson.plugins.git.extensions.impl.CleanCheckout.onCheckoutCompleted(CleanCheckout.java:28)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:890)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1415)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
      at hudson.model.Run.execute(Run.java:1678)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)

            ndeloof Nicolas De Loof
            hannupiki Hannu Piki
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: