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

Root workspace directory is removed when doing initial clone

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • git-plugin
    • None

      When using GIT SCM the checkout of sources tries to delete root workspace directory. It can be "/usr/share/path-to-app" in my case. Jenkins user is not allowed to delete this directory. So build fails.

      Can we somehow don't remove the root workspace directory?

      Have not seen such problem with Subversion SCM.

          [JENKINS-16873] Root workspace directory is removed when doing initial clone

          According to http://www.kernel.org/pub/software/scm/git/docs/git-clone.html, "Cloning into an existing directory is only allowed if the directory is empty." so this doesn't seem to be a requirement to delete the workspace directory, just to remove everything it contains

          Nicolas De Loof added a comment - According to http://www.kernel.org/pub/software/scm/git/docs/git-clone.html , "Cloning into an existing directory is only allowed if the directory is empty." so this doesn't seem to be a requirement to delete the workspace directory, just to remove everything it contains

          This breaks compatibility with older git version:
          <directory>
          The name of a new directory to clone into. The "humanish" part of the source repository is used if no directory is
          explicitly given ("repo" for "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). Cloning into an existing
          directory is not allowed.

          Thomas Schmidt added a comment - This breaks compatibility with older git version: <directory> The name of a new directory to clone into. The "humanish" part of the source repository is used if no directory is explicitly given ("repo" for "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). Cloning into an existing directory is not allowed.

          Please fix the problem with non actual but newer than 1.3.3 git versions (e.g. 1.6.0.2) with the directory to clone to. Or adjust the git version requirement.

          Thomas Schmidt added a comment - Please fix the problem with non actual but newer than 1.3.3 git versions (e.g. 1.6.0.2) with the directory to clone to. Or adjust the git version requirement.

          Can't maintain compatibility with obsolete git versions.
          Alternative is to select jGit

          Nicolas De Loof added a comment - Can't maintain compatibility with obsolete git versions. Alternative is to select jGit

            ndeloof Nicolas De Loof
            rprots Roman Prots'
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: