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

Cannot use jenkins-cli with github oauth plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm using the github-oauth plugin for authentication and the Github Commiter Authorization Strategy and I'm unable to use the jenkins-cli with it. Running this command:

      java -jar jenkins-cli.jar -s http://localhost:8080 who-am-i --username <username> --password <jenkins-api-token> 

      results in an error:

      "--username" is not a valid option
      java -jar jenkins-cli.jar who-am-i
      Reports your credential and permissions.
      

      I've also tried ssh key auth with the -i flag but get a similar error about -i being an invalid option.

      Is there another way to use jenkins-cli with github auth?

        Attachments

          Issue Links

            Activity

            Hide
            jhoblitt Joshua Hoblitt added a comment -

            What version of the core is needed to test this?

            Show
            jhoblitt Joshua Hoblitt added a comment - What version of the core is needed to test this?
            Show
            sag47 Sam Gleske added a comment - Joshua Hoblitt https://github.com/jenkinsci/github-oauth-plugin/blob/github-oauth-0.25/pom.xml#L16-L17
            Show
            sag47 Sam Gleske added a comment - Resolved by https://github.com/jenkinsci/github-oauth-plugin/pull/77
            Hide
            wfollonier Wadeck Follonier added a comment -

            FTR this is no longer working since 2.165 and https://github.com/jenkinsci/jenkins/pull/3838 (removing of remoting for CLI)

            Show
            wfollonier Wadeck Follonier added a comment - FTR this is no longer working since 2.165 and https://github.com/jenkinsci/jenkins/pull/3838 (removing of remoting for CLI)
            Hide
            jglick Jesse Glick added a comment -

            You ought to be able to use -auth with an API token.

            https://github.com/jenkinsci/github-oauth-plugin/pull/119 deletes the obsolete CliAuthenticator implementation.

            Show
            jglick Jesse Glick added a comment - You ought to be able to use -auth with an API token. https://github.com/jenkinsci/github-oauth-plugin/pull/119 deletes the obsolete CliAuthenticator implementation.

              People

              Assignee:
              sag47 Sam Gleske
              Reporter:
              heydrick Eric Heydrick
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: