No valid crumb was included in the request - Jenkins on Windows

孤街浪徒 提交于 2019-12-10 02:11:36

问题


I installed Jenkins 2.46.2 on Windows Server 2012 and integrated it with GitBucket.

I am trying the trigger the build when a change is pushed to GitBucket.

I tried to add a webhook but I get this error:

Error 403 No valid crumb was included in the request

HTTP ERROR 403

Problem accessing /jenkins/gitbucket-webhook/. Reason:

 No valid crumb was included
in the request

Powered by Jetty://

回答1:


For me the problem was that I left the jenkins window unattended for some time. Once I navigated to the jenkins root I was prompted to sign in again and was able to configure the job with git. I also enabled AUTO REFRESH in jenkins which will likely prevent this in the future.




回答2:


This worked for me:

obtain crumb

$ wget -q --auth-no-challenge --user yourUserName --password yourPassword--output-document - 'http://myJenkins:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'

Now Run Jenkins Job

$ curl -I -X POST http://yourUserName:yourPassword@myJenkins:8080/job/JOBName/build -H "Jenkins-Crumb:44e7038af70da95a47403c3bed5q10f8"

HTTP/1.1 201 Created Date: Fri, 28 July 2017 09:15:45 GMT X-Content-Type-Options: nosniff Location: http://myJenkins:8080/queue/item/17/ Content-Length: 0



来源:https://stackoverflow.com/questions/44062737/no-valid-crumb-was-included-in-the-request-jenkins-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!