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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • github-oauth-plugin
    • None
    • Jenkins ver. 1.532.1 (LTS)
      GitHub OAuth Plugin 0.20 (latest)

      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.

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

              Created:
              Updated:
              Resolved: