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

Root workspace directory is removed when doing initial clone

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            ndeloof 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

            Show
            ndeloof 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
            Hide
            schmidtri 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.

            Show
            schmidtri 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.
            Hide
            schmidtri 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.

            Show
            schmidtri 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.
            Hide
            ndeloof Nicolas De Loof added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: