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

GitHub Branch Source Plugin can't create status if credential restricted by spec

    Details

    • Similar Issues:

      Description

      There appears to be an issue with the github-branch-source plugin where if you put a specification on a credential's domain, the credential will never be selected to authenticate when creating a GitHub Status. This appears to be because the apiUrl is not being passed when looking up the credential.

      The project build log will display:

      Could not update commit status. Message: {"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}
      

      I've got a patch incoming and have tested it out for a hostname specification and was able to successfully have it fail before and succeed after the patch. I also reverted to 2.2.2 and the failure returned.

        Attachments

          Issue Links

            Activity

            justinharringa Justin Harringa created issue -
            justinharringa Justin Harringa made changes -
            Field Original Value New Value
            Issue Type Task [ 3 ] Bug [ 1 ]
            justinharringa Justin Harringa made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            justinharringa Justin Harringa added a comment -

            I have created a pull request to resolve this issue.

            Show
            justinharringa Justin Harringa added a comment - I have created a pull request to resolve this issue.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubBuildStatusNotification.java
            http://jenkins-ci.org/commit/github-branch-source-plugin/68103188034a0fac323ce2111ae462c3c8116cd8
            Log:
            Merge pull request #155 from justinharringa/JENKINS-46364

            JENKINS-46364 Connector.lookupScanCredentials - pass apiUrl()

            Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/ced0cb0dd661...68103188034a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubBuildStatusNotification.java http://jenkins-ci.org/commit/github-branch-source-plugin/68103188034a0fac323ce2111ae462c3c8116cd8 Log: Merge pull request #155 from justinharringa/ JENKINS-46364 JENKINS-46364 Connector.lookupScanCredentials - pass apiUrl() Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/ced0cb0dd661...68103188034a
            stephenconnolly Stephen Connolly made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 17916 ]
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                justinharringa Justin Harringa
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: