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

Git repo URL 404s cause null reference exception and a UI 500 response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: github-oauth-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.532.1 (LTS)
      GitHub OAuth Plugin 0.20 (latest)
    • Similar Issues:

      Description

      Overview
      ---------
      The Github repository permissions feature of the Github Commiter Authorization Strategy in the github-oauth-plugin throws a fatal error when the Github URL for the Job is an invalid URL (e.g., 404). The authorization strategy should fail gracefully when the repo URL is invalid.

      Steps To Reproduce
      ------------------
      1) Configure Jenkins Global security (http://jenkins/configureSecurity) to use the Github Authentication Plugin and use the "Github Commiter Authorization Strategy" with the option enabled for "Use Github repository permissions"
      2) Create a new Job with a Git SCM provider (e.g., "MyJob")
      3) Enter an invalid Git Repository URL that does not exist (e.g., git@github.com:MyOrg/wrong-repo-name.git instead of git@github.com:MyOrg/correct-repo-name.git)
      4) Save the Job config (note: ignore the warnings about an invalid Git URL; we've seen valid URLs renamed, moved to new orgs, etc)

      Actual Result
      -------------
      The Jenkins web UI URL for the Job (e.g., http://jenkins/job/MyJob) responds with a 500 error caused by a NullReferenceException in the Github authorization strategy

      Expected Result
      ---------------
      The Jenkins web UI URL for the job should respond with a 200 and render the normal view for the job. Attempts to build the job should fail due to the invalid Git URL.

        Attachments

          Issue Links

            Activity

            Hide
            stevejansen Steve Jansen added a comment -
            Show
            stevejansen Steve Jansen added a comment - Just found this is a duplicate of JENKINS-24383 See https://github.com/jenkinsci/github-oauth-plugin/pull/32

              People

              Assignee:
              sag47 Sam Gleske
              Reporter:
              stevejansen Steve Jansen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: