ExportXMLWordPrintable

      Command line git is unable to clone with http from the userContent.git repository provided by the Jenkins git-usercontent-plugin if CSRF protection is enabled.

      Steps to repeat the problem:

      1. Download and unpack the JENKINS-48363.zip on a Linux computer
      2. Change to the JENKINS-48363 directory and run bash ./README
      3. Open a web browser to the Jenkins controller running on port 8080 and confirm that the Clone-userContent-with-git was successful
      4. Stop the running bash ./README
      5. Edit the README file to remove the DISABLE_CSRF setting from the java command line that starts Jenkins
      6. Run bash ./README again
      7. Open a web browser to the Jenkins controller running on port 8080 and confirm that the Clone-userContent-with-git fails

      When the clone fails, it reports:

      $ git clone http://localhost:8080/userContent.git
      Cloning into 'userContent'...
      error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403 No valid crumb was included in the request
      fatal: The remote end hung up unexpectedly
      

      The only workaround I've found is to disable CSRF protection.

            Assignee:
            Unassigned
            Reporter:
            Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: