Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4400

Can't monitor external jobs if hudson requires authentication.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      When invoking hudson.Main with the name of a an external job and the path to the
      script or program to run as arguments 1 and 2, a "Authentication required" error
      message is given if hudson requires authentication. This is true even if the
      HUDSON_HOME environment variable has the username and password in it.

      A workaround is to not use hudson.Main, but another program, such as "curl" to
      send the data as a POST and to provide the authentication credentials...

          [JENKINS-4400] Can't monitor external jobs if hudson requires authentication.

          victorf1973 added a comment -

          Does openConnection look at URL.getUserinfo() ?

          victorf1973 added a comment - Does openConnection look at URL.getUserinfo() ?

          Alan Harder added a comment -

          started

          Alan Harder added a comment - started

          Alan Harder added a comment -

          r21479 | mindless | 2009-09-04 21:49:03 -0700 (Fri, 04 Sep 2009) | 10 lines
          Changed paths:
          M /trunk/hudson/main/core/src/main/java/hudson/EnvVars.java
          M /trunk/hudson/main/core/src/main/java/hudson/Functions.java
          M /trunk/hudson/main/core/src/main/java/hudson/Main.java
          M /trunk/hudson/main/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java

          Add authentication support in hudson.Main (if username/password are included in
          HUDSON_HOME URL, then include Authorization header in Hudson http requests).

          Also moved Functions.isUnitTest to Main.isUnitTest, to remove dependency on
          winstone.jar for running hudson.Main (Main uses EnvVars which checks isUnitTest
          flag.. in Functions which uses servlet classes).

          Updated http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs
          with info about required jars and authentication.

          Alan Harder added a comment - r21479 | mindless | 2009-09-04 21:49:03 -0700 (Fri, 04 Sep 2009) | 10 lines Changed paths: M /trunk/hudson/main/core/src/main/java/hudson/EnvVars.java M /trunk/hudson/main/core/src/main/java/hudson/Functions.java M /trunk/hudson/main/core/src/main/java/hudson/Main.java M /trunk/hudson/main/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java Add authentication support in hudson.Main (if username/password are included in HUDSON_HOME URL, then include Authorization header in Hudson http requests). Also moved Functions.isUnitTest to Main.isUnitTest, to remove dependency on winstone.jar for running hudson.Main (Main uses EnvVars which checks isUnitTest flag.. in Functions which uses servlet classes). Updated http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs with info about required jars and authentication.

            mindless Alan Harder
            victorf1973 victorf1973
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: