jenkins Trigger builds remotely 403

在默认配置下使用 jenkinsTrigger builds remotely功能时出现403错误:

[root@qqmm ~]# curl -i http://jenkins.cent.com/job/jenkins_test/build?token=buildnow
HTTP/1.1 403 Forbidden
Server: nginx/1.6.3
Date: Wed, 01 Jun 2016 15:51:51 GMT
Content-Type: text/html;charset=UTF-8
Content-Length: 883
Connection: keep-alive
X-Content-Type-Options: nosniff
Set-Cookie: JSESSIONID.4acf60f6=1nmoouils0l6l1ey51fiw1syj4;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Hudson: 1.395
X-Jenkins: 2.6
X-Jenkins-Session: 983eb0cf
X-You-Are-Authenticated-As: anonymous
X-You-Are-In-Group:
X-Required-Permission: hudson.model.Hudson.Read
X-Permission-Implied-By: hudson.security.Permission.GenericRead
X-Permission-Implied-By: hudson.model.Hudson.Administer




Authentication required


 

解决方式

  1. 使用其他插件代替 https://wiki.jenkins-ci.org/display/JENKINS/Build+Token+Root+Plugin
  2. 或者在jenkins配置中勾选下图的选项即可


    jenkins Trigger builds remotely 403_第1张图片
    jenkins_remote_build.png

参考:

  1. http://stackoverflow.com/questions/16267060/jenkins-trigger-builds-remotely-with-token-not-working-when-matrix-authoriza
  2. https://wiki.jenkins-ci.org/display/JENKINS/Quick+and+Simple+Security

你可能感兴趣的:(jenkins Trigger builds remotely 403)