github-integration-plugin
github-integration-plugin copied to clipboard
Jobs are stopped being triggered - java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=myorgname,repository=myreponame]
I have all the latest Jenkins github plugins:
GitHub API Plugin 1.95
GitHub Branch Source Plugin 2.4.1
GitHub Integration Plugin 0.2.4
GitHub plugin 1.29.3
GitHub Pull Request Builder 1.42.0
I have several pipeline jobs configured to be triggered on every push on master on GitHub. They worked just fine until lately (unfortunately I can't point to a specific day when it stopped working). I can see this error in system log and in GitHubHookRegisterProblemMonitor page:
Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=MYORGNAME,repository=MYREPO]
java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=username=MYORGNAME,repository=MYREPO]
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:231)
at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:179)
at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:175)
at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
at com.google.common.collect.Iterators$8.next(Iterators.java:812)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:648)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at com.google.common.collect.Lists.newArrayList(Lists.java:138)
at com.google.common.collect.Lists.newArrayList(Lists.java:119)
at org.jenkinsci.plugins.github.util.FluentIterableWrapper.toList(FluentIterableWrapper.java:147)
at org.jenkinsci.plugins.github.webhook.WebhookManager$1.run(WebhookManager.java:127)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The weird thing is it says [host=github.com,username=MYORGNAME,repository=MYREPO] while username is my organization name instead of the user that has the key defined.
I did all the checks described here: https://support.cloudbees.com/hc/en-us/articles/224621648-GitHub-Webhook-Troubleshooting Please advice how it can be fixed.
Looks similar to https://issues.jenkins-ci.org/browse/JENKINS-49332
Same exact issue here: same error, and username
is also set to our org name.
Same issue here too.
Same issue, but ours is a bit weird. We've just migrated from bitbucket to github and some how the plugin is getting host=bitbucket.org for some repos. Does anyone know how to fix it?
Same issue here too!
Anyone found a solution to it
I manually added a webhook to the repos I was interested in.
@KarlOfDuty could you provide some more information how you added the webhooks manually?
github repo settings -> webhooks