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

Jenkins-cli seems to not support anything different from Github token

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: github-oauth-plugin
    • Labels:
      None
    • Environment:
      github-oauth-plugin 0.26
      matrix-auth-plugin 1.5
    • Similar Issues:

      Description

      Documentation at https://wiki.jenkins-ci.org/display/JENKINS/GitHub+OAuth+Plugin#GitHubOAuthPlugin-CallingJenkinsAPIusingGitHubPersonalAccessTokens says:

      One can still call the Jenkins API by using Jenkins tokens or use the Jenkins CLI with an SSH key for authentication. However, the GitHub OAuth plugin provides another way to call the Jenkins API by allowing the use of a GitHub Personal Access Token.

      However, I cannot make SSH authentication work (by adding SSH keys to the users being created by the extension) nor Jenkins tokens work (by using the tokens from their profiles).
      The only authentication option seems to be:

      java -jar /usr/local/bin/jenkins-cli.jar -s https://jenkins -noKeyAuth who-am-i --username elife-alfred-user --password my_github_token
      

      Is the documentation outdated or is it a regression?

        Attachments

          Issue Links

            Activity

            Show
            sag47 Sam Gleske added a comment - 0.27 released https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/github-oauth/0.27/github-oauth-0.27.hpi
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Gleske
            Path:
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            http://jenkins-ci.org/commit/github-oauth-plugin/72075ba852186552e2779e59fa65e34d5a93edd4
            Log:
            Merge pull request #83 from jenkinsci/fix-transport-auth

            JENKINS-43822 Fix Jenkins CLI transport auth

            Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/05313d07327f...72075ba85218

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java http://jenkins-ci.org/commit/github-oauth-plugin/72075ba852186552e2779e59fa65e34d5a93edd4 Log: Merge pull request #83 from jenkinsci/fix-transport-auth JENKINS-43822 Fix Jenkins CLI transport auth Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/05313d07327f...72075ba85218
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Gleske
            Path:
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            http://jenkins-ci.org/commit/github-oauth-plugin/8d7c27e2f4808d54aaaa4f8f5f3b732bb634ffba
            Log:
            JENKINS-43822 Fix Jenkins CLI transport auth

            This fixes using authentication in the following ways using HTTP
            transport auth and SSH authentication.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java http://jenkins-ci.org/commit/github-oauth-plugin/8d7c27e2f4808d54aaaa4f8f5f3b732bb634ffba Log: JENKINS-43822 Fix Jenkins CLI transport auth This fixes using authentication in the following ways using HTTP transport auth and SSH authentication.
            Hide
            sag47 Sam Gleske added a comment -

            Please review my PR.

            https://github.com/jenkinsci/github-oauth-plugin/pull/83

            I tested it locally and it resolved the issue for both cases presented.

            Show
            sag47 Sam Gleske added a comment - Please review my PR. https://github.com/jenkinsci/github-oauth-plugin/pull/83 I tested it locally and it resolved the issue for both cases presented.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Gleske
            Path:
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            http://jenkins-ci.org/commit/github-oauth-plugin/4690bfb6ce3989c940f5dd5f93dfc1ef315ea5de
            Log:
            JENKINS-43822 Fix Jenkins CLI transport auth

            This fixes using authentication in the following ways using HTTP
            transport auth and SSH authentication.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java http://jenkins-ci.org/commit/github-oauth-plugin/4690bfb6ce3989c940f5dd5f93dfc1ef315ea5de Log: JENKINS-43822 Fix Jenkins CLI transport auth This fixes using authentication in the following ways using HTTP transport auth and SSH authentication.

              People

              • Assignee:
                sag47 Sam Gleske
                Reporter:
                giorgiosironi Giorgio Sironi
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: