-
Notifications
You must be signed in to change notification settings - Fork 25
[JENKINS-43370] Fix proxy resolution for enterprise Githubs #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@raul-arabaolaza Could you take a look? |
|
@schulzh Gladly, code LGTM (sorry for missing this bug) but it would be great if you can edit your commit message to append |
|
@raul-arabaolaza done. |
|
@schulzh Great, allow me to do some tests (need to set up a proxy) to check and if all goes fine I will merge and release another version. Probably this weekend |
|
@schulzh Can you give me a way to test this? I have been doing the following and the PR is not working
Maybe I need to set up a real proxy? |
|
How did you configure the proxy server in Jenkins? |
|
@schulzh Yikes, my failure, I was configuring them for the plugin manager and no the entire jenkins instance it seems, will retry the test |
|
Well, I am having the same results... I guess I need to set up a real proxy |
|
this is def an issue. having to sit at 1.0.2 until this is fixed |
|
@raul-arabaolaza I am trying to follow up with this issue. This PR does fix our problem, and I would like to add a unit-test to verify the behavior. What is missing is a test that attempts to use "github.company.com", with proxy configured with an exception for "company.com". In that case, the proxy code should indicate a direct connection. Further, for an attempt to use "github.com" with an exception "company.com", the proxy code should indicate the use of the proxy is required. However, when I run "mvn test" (on master), I get occasional failures in the console, but the build of the HPI does not fail. Further, I am unable to run the tests in Eclipse (not a big deal, if native mvn worked). I don't know whether this is an issue with my setup, or with the code. In order to introduce updated unit-tests, I would like to see a successful build. What forum should I use to follow-up or get help with this? |
|
I can confirm that this patch fixed the "The supplied credentials are invalid to login" for my use case. |
|
@raul-arabaolaza label |
The Jenkins ProxyConfiguration class expects only the hostname (e.g.
git.example.comvshttps://git.example.com/api/) as a method parameter tocreateProxy, but the existing code gives it the whole URL.As a result of this, the validation of no-proxy hosts list is not correct. This is not noticeable when using github.com (altough the https:// should not be there either), but it fails when using enterprise githubs.