我在Windows Server 2012上安装了Jenkins 2.46.2,并将其与GitBucket集成。
当将更改推送到GitBucket时,我正在尝试触发构建。
我尝试添加一个Webhook,但出现此错误:
最佳答案
这为我工作:
获取面包屑
$ wget -q --auth-no-challenge --user yourUserName --password yourPassword--output-document - 'http://myJenkins:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'
现在进行中Jenkins Job
$ curl -I -X POST http://yourUserName:yourPassword@myJenkins:8080/job/JOBName/build -H "Jenkins-Crumb:44e7038af70da95a47403c3bed5q10f8
“HTTP/1.1 201创建日期:2017年7月28日星期五,格林尼治标准时间X-Content-Type-Options:nosniff位置:http://myJenkins:8080/queue/item/17/内容长度:0