-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: git-usercontent-plugin
-
None
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:
- Download and unpack the JENKINS-48363.zip
on a Linux computer - Change to the JENKINS-48363 directory and run bash ./README
- Open a web browser to the Jenkins controller running on port 8080 and confirm that the Clone-userContent-with-git was successful
- Stop the running bash ./README
- Edit the README file to remove the DISABLE_CSRF setting from the java command line that starts Jenkins
- Run bash ./README again
- 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.