jenkinsci / jenkinsci/java-client-api

CRUM does not work / when using with localhost

Offen
#372 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
913
Forks
466
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

JobWithDetails jJob = jenkins.getJob(name);

//crumb support
QueueReference q = jJob.build(true);

===
the above API works fine when Jenkins URL is set to say http://10.158.13.X:8080/ but gives Crumb error when is set to http://localhost:8080/

org.apache.http.client.HttpResponseException: No valid crumb was included in the request
at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11) ~[jenkins-client-0.3.8.jar:0.3.8]

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reproducing the localhost case with the JobWithDetails.build(true) call and compare it with the 10.158.13.X URL. Read the crumb-related request path and com.offbytwo.jenkins.client.validator.HttpResponseValidator; done means the same build request succeeds against localhost without the invalid-crumb exception.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
api, authentication
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.