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

ALLOW_LOCAL_CHECKOUT set but local checkout not available

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • git-plugin
    • None
    • Jenkins: 2.332.3
      OS: Linux - 5.4.0-110-generic (Ubuntu 22.04 64 bit)
      git:4.11.2
      git-client:3.11.0
      git-server:1.11

      Following update of plugin to 4.11.2, local git checkout fails with error:

      ERROR: Checkout of Git remote '/var/www/XXX' aborted because it references a local directory, which may be insecure. You can allow local checkouts anyway by setting the system property 'hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT' to true.

      Script Console is used to temporarily set the required property:

      System.setProperty("hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT", "true")
      
      Result: true

      System Properties page confirms the property is set:

      hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT true

      Script Console confirms the property is set using code from GitSCM class:

      import jenkins.util.SystemProperties;
      String ALLOW_LOCAL_CHECKOUT_PROPERTY = hudson.plugins.git.GitSCM.class.getName() + ".ALLOW_LOCAL_CHECKOUT";
      SystemProperties.getBoolean(ALLOW_LOCAL_CHECKOUT_PROPERTY);
      
      Result: true
      

      Local checkout fails with the same error.

      ERROR: Checkout of Git remote '/var/www/XXX' aborted because it references a local directory, which may be insecure. You can allow local checkouts anyway by setting the system property 'hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT' to true.

       

      I've not needed to set a system property before, so this could well be a user error, but I'm not sure how else I can look at this to see what might be at fault.

       

            markewaite Mark Waite
            somsip Mark White
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: