"Authentication ID" is missing I just worked on setting up Jenkins (the latest version is 2.5) for a reverse...">

Jenkins "Trigger builds remotely"> "Authentication ID" is missing

I just worked on setting up Jenkins (the latest version is 2.5) for a reverse proxy with Nginx so that I can access it through HTTPS.

It works, but my Multibranch Pipeline jobs no longer have the “Trigger Builds Remoteally” option in the main configuration. I do not think that I changed other configurations. Any ideas on what happened and how to get them back?

Here is what I want:

Screenshot of what I want to return

+4
source share
3 answers

After some time and searching, I think I can confidently answer my question.

, . () Jenkins (. https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients https://wiki.jenkins-ci.org/display/JENKINS/Quick+and+Simple+Security).

, Matrix ( " " → "" ), " " , ​​ , Jenkins.

, HTTP- / ( / API):

curl -X POST "https://username:api-token@JENKINS_URL/job/Example/build"
+8

. API, , . " API".

+1

, , , stackoverflow, , .

comment stackoverflow deadlink.

- Football. jenkins admin:admin, . URL- jenkins http://192.168.99.20:8080, .

  • jenkins http://192.168.99.20:8080 .
  • " " "".
  • .
  • " ".
  • " (, )", , , . Use the following URL to trigger build remotely: JENKINS_URL/job/Football/build?token=TOKEN_NAME or /buildWithParameters?token=TOKEN_NAME. Optionally append &cause=Cause+Text to provide text that will be included in the recorded build cause..
  • .

API

  • jenkins http://192.168.99.20:8080 .
  • ( admin) .
  • "", http://192.168.99.20:8080/user/admin/configure.
  • " API" " API".
  • " " " API" curl . admin:85703fb68927f04968630e192e4927cb

API .

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

- Jenkins-Crumb:44e7033af70da95a47403c3bed5c10f8. curl , HTTP/1.1 403 Forbidden Error 403 No valid crumb was included in the request.

$ curl -I -X POST http://admin:85703fb68927f04968630e192e4927cb@192.168.99.20:8080/job/Football/build -H "Jenkins-Crumb:44e7033af70da95a47403c3bed5c10f8"
HTTP/1.1 201 Created
Date: Fri, 02 Jun 2017 06:17:51 GMT
X-Content-Type-Options: nosniff
Location: http://192.168.99.20:8080/queue/item/17/
Content-Length: 0
Server: Jetty(9.2.z-SNAPSHOT)

, Jenkins-Crumb cli .

CRUMB=$(curl -s 'http://USER:TOKEN@localhost:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
0

Source: https://habr.com/ru/post/1672389/


All Articles