Open xjliang2007 opened 4 years ago
I extend the JenkinsHttpClient to workaroud, :( .
public class ClubJenkinsHttpClient extends JenkinsHttpClient {
public ClubJenkinsHttpClient(URI uri,String username, String password){
super(uri, HttpClientBuilder.create(), username, password);
if(getLocalContext() != null){
getLocalContext().setAttribute("preemptive-auth",new BasicScheme(Charset.forName("UTF-8")));
}
}
}
error is as follows: Exception in thread "main" org.apache.http.client.HttpResponseException: Invalid password/token for user: ???
I check the source code, the jenkins http client use ascii as default charset when using basic auth, I think it should be modified to use more conveniently.