Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.509.4
      Jenkins GIT client plugin 1.4.5
      Jenkins GIT plugin 2.0
    • Similar Issues:

      Description

      Steps to reproduce:

      • Enter proxy settings in update manager, e.g. proxy and 8080 since these do not matter
      • Add an entry to "No proxy hosts" for the host you want to connect to e.g. localhost
      • Create a job with git and use the host from above in a http scheme URL

      See that the connect fails since it tries to use the proxy.
      If you remove the proxy settings, it works.

      Expected behavior is that that "no proxy hosts" should NOT be ignored.

        Attachments

          Activity

          Hide
          arlol Arlo Louis O'Keeffe added a comment -

          The workaround for us now is to remove the proxy settings.

          This disables updates but keeps jenkins running.

          Show
          arlol Arlo Louis O'Keeffe added a comment - The workaround for us now is to remove the proxy settings. This disables updates but keeps jenkins running.
          Hide
          chrisabit chrisabit added a comment -

          The problematic code (git-client 1.4.5 org.jenkinsci.plugins.gitclient.CliGitAPIImpl line 1374):

          if (proxy != null)

          { client.getHostConfiguration().setProxy(proxy.name, proxy.port); client.getState().setProxyCredentials(AuthScope.ANY, new UsernamePasswordCredentials(proxy.getUserName(), proxy.getPassword())); }

          The following code is also suboptimal because the Root-Exception is hidden (same Class line 1390):

          } catch (IOException e)

          { throw new GitException("Failed to connect to " + u.toString() + (cred != null ? " using credentials " + cred.getDescription() : "" )); }

          catch (IllegalArgumentException e)

          { throw new GitException("Invalid URL " + u.toString()); }

          On our productive jenkins a IOException does happen - and we don't know the reason!

          Show
          chrisabit chrisabit added a comment - The problematic code (git-client 1.4.5 org.jenkinsci.plugins.gitclient.CliGitAPIImpl line 1374): if (proxy != null) { client.getHostConfiguration().setProxy(proxy.name, proxy.port); client.getState().setProxyCredentials(AuthScope.ANY, new UsernamePasswordCredentials(proxy.getUserName(), proxy.getPassword())); } The following code is also suboptimal because the Root-Exception is hidden (same Class line 1390): } catch (IOException e) { throw new GitException("Failed to connect to " + u.toString() + (cred != null ? " using credentials " + cred.getDescription() : "" )); } catch (IllegalArgumentException e) { throw new GitException("Invalid URL " + u.toString()); } On our productive jenkins a IOException does happen - and we don't know the reason!
          Hide
          ud10404 Timothy Rundle added a comment -

          I ran into the same issue. Attach is a patch that solved the issue for me.

          Show
          ud10404 Timothy Rundle added a comment - I ran into the same issue. Attach is a patch that solved the issue for me.

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              arlol Arlo Louis O'Keeffe
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: