What I am trying to achieve
Trigger a build from Bitbucket when a pull request is created using the remote trigger option in Jenkins. So I created a job in Jenkins and configured to trigger a build with the remote API.
In Bitbucket I created a webhook to trigger the build with the following URL structure:
http://jenkins_server_ip:port/job/job-name/build?token=<t1>
I get the following error:
<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/android-sample/build. 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 digged into the internet and some says that we need to use the crumbIssuer API in Jenkins which is done with wget. How can I use this in Bitbucket?
