jenkinsci / jenkinsci/java-client-api

Caused by: org.apache.http.HttpException: No credentials for preemptive authentication

Ouverte
#504 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Java
Étoiles
913
Forks
466
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Jenkins and plugins versions report

Environment


```text
Paste the output here
```

### What Operating System are you using (both controller, and any agents involved in the problem)?

win

### Reproduction steps

JenkinsServer jenkinsServer = new JenkinsServer(
new URI("https:xxx"),
"xxx",
"xxx"
);
jenkinsServer.getJobs();

### Expected Results

jobs

### Actual Results

at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.apache.http.HttpException: No credentials for preemptive authentication
at com.offbytwo.jenkins.client.PreemptiveAuth.process(PreemptiveAuth.java:39)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
... 38 more

### Anything else?

_No response_

### Are you interested in contributing a fix?

_No response_

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

The stack trace points to PreemptiveAuth.java:39; begin there and inspect the JenkinsServer/getJobs reproduction described in the issue. Reproduce the authentication failure using the stated Windows environment, and consider the work complete when getJobs returns the expected jobs without this exception.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
api, authentication
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
28/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.