I'm running Jenkins 2.150.2 in an Openshift Cluster.I'm using a plugin called Jenkins-openshift-login-plugin to login into the Jenkins account.
When I enable Csrf protection and try to do the curl to trigger a job.It fails and give the error as
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /job/OpenShift%20Sample/. Reason:
<pre> No valid crumb was included in the request</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
I have the valid crumb and token but still, I'm getting the error. The command that I'm using for the request is
curl -X POST -H "Authorization: Bearer <Token>" -H "Jenkins-Crumb: <Crumb>" <Jenkins URL>/job/myProject
I do not know what am I doing wrong.