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

Can't monitor external jobs if hudson requires authentication.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:
      Show 5 results

      Description

      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...

        Attachments

          Activity

          Hide
          victorf1973 victorf1973 added a comment -

          Does openConnection look at URL.getUserinfo() ?

          Show
          victorf1973 victorf1973 added a comment - Does openConnection look at URL.getUserinfo() ?
          Hide
          mindless Alan Harder added a comment -

          started

          Show
          mindless Alan Harder added a comment - started
          Hide
          mindless 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.

          Show
          mindless 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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: