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

plugin reporting error "java.lang.IllegalArgumentException: The supplied credentials are invalid to login" on latest version

    Details

    • Similar Issues:

      Description

      Using the following pipeline code:

      githubNotify context: "Ansible-${ansVersion}",
        credentialsId: 'generic-credentials-id',
        description: 'Testing',
        gitApiUrl: 'https://git.illumina.com/api/v3/',
        status: 'PENDING'

      works fine with version 1.0.1 of the plugin.  However, using the latest version, (1.0.4) fails to build the pipeline, with exactly the same code and then reports the following when attempting to notify back to github again

      java.lang.IllegalArgumentException: The supplied credentials are invalid to login
      	at org.jenkinsci.plugins.pipeline.githubstatusnotification.GitHubStatusNotificationStep.getGitHubIfValid(GitHubStatusNotificationStep.java:263)
      	at org.jenkinsci.plugins.pipeline.githubstatusnotification.GitHubStatusNotificationStep.getRepoIfValid(GitHubStatusNotificationStep.java:268)
      	at org.jenkinsci.plugins.pipeline.githubstatusnotification.GitHubStatusNotificationStep.access$100(GitHubStatusNotificationStep.java:79)
      	at org.jenkinsci.plugins.pipeline.githubstatusnotification.GitHubStatusNotificationStep$Execution.run(GitHubStatusNotificationStep.java:373)
      	at org.jenkinsci.plugins.pipeline.githubstatusnotification.GitHubStatusNotificationStep$Execution.run(GitHubStatusNotificationStep.java:355)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Finished: FAILURE
      
      

      From what I can see, there has been no update to the documentation on what is required syntax wise for this plugin to work with GitHub Enterprise.

        Attachments

          Activity

          Hide
          dloomer David Loomer added a comment -

          I'm not so sure about that explanation Raul Arabaolaza but I may be mistaken. First, the plugin code has definitely changed from 1.01 to 1.04: It used to call "GitHub.connectToEnterprise()" which I believe followed whatever configuration is set up for access, but now it calls "githubBuilder.withOAuthToken()". Second, I believe that latter method means that only a token will work now:

           

          https://github.com/jenkinsci/pipeline-githubnotify-step-plugin/blob/pipeline-githubnotify-step-1.0.4/src/main/java/org/jenkinsci/plugins/pipeline/githubstatusnotification/GitHubStatusNotificationStep.java#L249

          Show
          dloomer David Loomer added a comment - I'm not so sure about that explanation Raul Arabaolaza but I may be mistaken. First, the plugin code has definitely changed from 1.01 to 1.04: It used to call "GitHub.connectToEnterprise()" which I believe followed whatever configuration is set up for access, but now it calls "githubBuilder.withOAuthToken()". Second, I believe that latter method means that only a token will work now:   https://github.com/jenkinsci/pipeline-githubnotify-step-plugin/blob/pipeline-githubnotify-step-1.0.4/src/main/java/org/jenkinsci/plugins/pipeline/githubstatusnotification/GitHubStatusNotificationStep.java#L249
          Hide
          sw97272 simon Wall added a comment - - edited

          I'm not sure if this is due to standard GutHub behaviour.  As David Loomer has highlighted, the behaviour in the plugin has changed between versions.  Using the older version, I can authenticate with the same gitHub Enterprise server using username and password, but with version 1.0.4 I only have success with an access token.

          It may be that there is also a relation to the version of GitHub enterprise that is running on the GH end, but there is definitely changes made in this plugin that causes the user's password to no longer be accepted.

          Show
          sw97272 simon Wall added a comment - - edited I'm not sure if this is due to standard GutHub behaviour.  As David Loomer has highlighted, the behaviour in the plugin has changed between versions.  Using the older version, I can authenticate with the same gitHub Enterprise server using username and password, but with version 1.0.4 I only have success with an access token. It may be that there is also a relation to the version of GitHub enterprise that is running on the GH end, but there is definitely changes made in this plugin that causes the user's password to no longer be accepted.
          Hide
          sfeng1 Shelly Feng added a comment -

          After upgrading  pipeline-githubnotify-step-plugin  to 1.0.4, githubNotify failed with username and token.
          https://github.com/jenkinsci/pipeline-githubnotify-step-plugin/commit/8dc82893abb36a0e99d23d810af06be346d0d41d#diff-13a86041066b2e5ecb5a5e73b7173c26R234
          The latest enhancement of proxy most likely breaks our githutNotify since we have both proxy and no proxy configuration in jenkins. The latest feature forces  jenkins.proxy.createProxy though it is for an internal website which does not require proxy at all. 

          Show
          sfeng1 Shelly Feng added a comment - After upgrading  pipeline-githubnotify-step-plugin  to 1.0.4, githubNotify failed with username and token. https://github.com/jenkinsci/pipeline-githubnotify-step-plugin/commit/8dc82893abb36a0e99d23d810af06be346d0d41d#diff-13a86041066b2e5ecb5a5e73b7173c26R234 The latest enhancement of proxy most likely breaks our githutNotify since we have both proxy and no proxy configuration in jenkins. The latest feature forces  jenkins.proxy.createProxy though it is for an internal website which does not require proxy at all. 
          Hide
          rarabaolaza Raul Arabaolaza added a comment -

          Sorry guys, I plan to dedicate some time this weekend, will try to fix this ASAP

          Show
          rarabaolaza Raul Arabaolaza added a comment - Sorry guys, I plan to dedicate some time this weekend, will try to fix this ASAP
          Hide
          ennef Christopher Fenner added a comment -

          I have the same issue, the plugin doesn't work with my enterprise instance in v1.0.4. However, v1.0.2 is working fine.

          Show
          ennef Christopher Fenner added a comment - I have the same issue, the plugin doesn't work with my enterprise instance in v1.0.4. However, v1.0.2 is working fine.

            People

            • Assignee:
              rarabaolaza Raul Arabaolaza
              Reporter:
              sw97272 simon Wall
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: