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

Jenkins unable to manage webhooks of Github organization

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Under GitHub Pull Request Builder configuration Auto-manage webhooks is enabled.

      In the GitHub Pull Request Builder added user credentials. User belongs to owners' User's credential tested and are working.

      Webhooks management however does not work. For every private repository there's an error message displayed in Jenkins: 

      There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=ORG_NAME,repository=REPO_NAME]

      From the error message it looks like plugin is trying to use organisation name as a user name, so authentication fails.

        Attachments

          Activity

          Hide
          neidhart Neidhart Orlich added a comment -

          Phillip Verheyden I tried your workaround and indeed the error messages in the Jenkins logs went away but the issue remained the same: 2% of our PRs do not trigger the CI.

          I disabled the workaround again because it was not helping and I am still sure it's related:
          Everytime when a PR does not trigger the CI I see the message
          Everytime when I check the logs after a PR that actually triggered the CI, the message is not there

          Show
          neidhart Neidhart Orlich added a comment - Phillip Verheyden I tried your workaround and indeed the error messages in the Jenkins logs went away but the issue remained the same: 2% of our PRs do not trigger the CI. I disabled the workaround again because it was not helping and I am still sure it's related: Everytime when a PR does not trigger the CI I see the message Everytime when I check the logs after a PR that actually triggered the CI, the message is  not there
          Hide
          markstosberg Mark Stosberg added a comment -

          Neidhart Orlich You have a lot of repos to scan. Maybe periodically you hit your quota for the Github API. Do you only experience on problems on days with lot of pushes to Github?

          Show
          markstosberg Mark Stosberg added a comment - Neidhart Orlich You have a lot of repos to scan. Maybe periodically you hit your quota for the Github API. Do you only experience on problems on days with lot of pushes to Github?
          Hide
          tarjei Tarjei Huse added a comment -

          Any news here?

          I have tried very hard to find a place in Jenkins to set the username for the secret key, but have failed and thus Jenkins reports my ORGNAME as the username when connecting to GitHub.

          Is there a way to configure this in Jenkins I'm not seeing? In the comments above I see some references to "Projects->GitHub Organization->Owner under your Jenkins GitHub organisation" but I cannot find any such link in my Jenkins install.

          Regards,

          Show
          tarjei Tarjei Huse added a comment - Any news here? I have tried very hard to find a place in Jenkins to set the username for the secret key, but have failed and thus Jenkins reports my ORGNAME as the username when connecting to GitHub. Is there a way to configure this in Jenkins I'm not seeing? In the comments above I see some references to "Projects->GitHub Organization->Owner under your Jenkins GitHub organisation" but I cannot find any such link in my Jenkins install. Regards,
          Hide
          magnayn magnayn added a comment -

          I don't know if this is of help, and it's a bit embarrasing that the most common usecase ("I have a github org, I want to build all the projects, and have webhooks added so this is efficient/fast") is so terrible UX-wise.

          But:

          In the project configuration, top level (github organization), you need to set up the organisation name (so it finds the right projects).

          You need some credentials to access github. It only lists "username/password" items on the list.

          However : for github if you're using a personal access token, the username is irrelevant. It really should offer 'secret' types in this list.

          I got ours to work by (re)creating a username/password credentials as username = ORG_NAME, password = personal_access_token.

          This might be of help.

          Show
          magnayn magnayn added a comment - I don't know if this is of help, and it's a bit embarrasing that the most common usecase ("I have a github org, I want to build all the projects, and have webhooks added so this is efficient/fast") is so terrible UX-wise. But: In the project configuration, top level (github organization), you need to set up the organisation name (so it finds the right projects). You need some credentials to access github. It only lists "username/password" items on the list. However : for github if you're using a personal access token, the username is  irrelevant . It really should offer 'secret' types in this list. I got ours to work by (re)creating a username/password credentials as username = ORG_NAME, password = personal_access_token. This might be of help.
          Hide
          saulcruz Saul Cruz added a comment -

          This is not only happening on GitHub organizations items, I have a free-style job that started failing with this same error. 

          Show
          saulcruz Saul Cruz added a comment - This is not only happening on GitHub organizations items, I have a free-style job that started failing with this same error. 

            People

            • Assignee:
              lanwen Kirill Merkushev
              Reporter:
              dmytro_kovalov Dmytro Kovalov
            • Votes:
              23 Vote for this issue
              Watchers:
              35 Start watching this issue

              Dates

              • Created:
                Updated: