Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Debugging "Error: Jenkins Response: No git jobs using repository" #147
Over the last month our nicely working setup has deteriorated and no longer triggers Jenkins jobs from Stash, even after upgrading to v2.7.1. When we attempt to trigger jenkins from the webhook configuration check, it reliably results in an error saying "Error: Jenkins response: No git jobs using repository: ssh://email@example.com:8999/project/repo.git and branches:".
This is puzzling because there very clearly are git jobs using that repository.
But the stash log doesn't offer any extra insight into what exactly was attempted and therefore why it might have failed, and I can't identify anything obvious in the Jenkins logs either.
So what's going wrong here? And assuming the answer isn't obvious, how do I debug and figure it out?
The thing about the polling is that it's not the notifier webhook's job. The webhook does not do the triggering of jobs... it simply pings Jenkins with a given repo name (and sometimes a bit of additional info in the GET url). Then it's up to Jenkins to do something with that info. It'll use the repo info to find Jenkins jobs for that repo. It's up to the job's configuration to be set to poll if you want that job to be trigger-able. When the job does its poll back to Stash, that's when it decides if it has a new commit to run a build against.
Remember, this plugin is installed in Stash, not in Jenkins... it's up to the Jenkins job to be configured correctly in order to utilize what the plugin is passing to it :-)
we have a corner case i guess where even after following all the above setup instructions we are seeing a break of functionality with the following error
Error: Jenkins response: No git jobs using repository: ssh://firstname.lastname@example.org/tesc/ab.git and branches: develop No Git consumers using SCM API plugin for: ssh://email@example.com/tesc/ab.git
In Bitbucket the default branch is setup as develop but the branch to build in Jenkins configuration is user/abc/jira-1234
i am able to get the build to trigger from Trigger Jenkins on the bitbucket jenkins configuration to work by changing the default branch in bitbucket to user/abc/jira-1234.
clearly above is not a choice for us since we would like to keep the default branch as develop and the decided naming convention.
also another way to get around this is to change the bitbucket web hook config to say omit branch name but that just triggers builds on the default develop branch in Jenkins, not the one which is of the type user/abc/jira-1234.
Thank you very much in advance for your help and the plugin any help is really appreciated.
referenced this issue
Dec 7, 2016
My Bitbucket project key is TSU. When setting up Bitbucket Server Webhook To Jenkins, it automatically generated the following URL
This did not work. Due to case-sensitivity.
I explicitly defined the project URL, by selecting the Custom option on Repo Clone URL, like this:
I run into this issue when setting BitBucket - Jenkins job.
I debugged this and it turned out the issue is coming from “git plugin” in my debug environment.
In my local environment, this issue is solved after fixing the code.
I did the following locally.
When sending webhook to Jenkins, “doNotifyCommit” in the GitStatus class is the entry point and
My understanding is that "onNotifiCommit function in the GitStatus class" doesn’t support multibranch workflow. Therefore, I introduced the following function.
private List onMultibranchJob(URIish uri,Jenkins jenkins,List result)
And, in the onNotifyCommit function, I added the following to support Muitlbranch job.
Git Plugin” project doesn’t have “WorkflowMultiBranchProject” dependency definition.
In my local environment, BitBucket - JenkinsJob(MultiBranch or BitBucket Team Project) is working fine with this fixing.
I recently joined DevOps job and I am very beginner for this type of setting.
I forked the git plugin repo and submitted the code onto https://github.com/kuniaki/git-plugin.
In my environment, I don’t see the webhook error.
NOTE: I verified BitBucket webhook behavior. I don't test GitHub,GitLab etc....
I am using pipeline and Bitbucket does not trigger new build.
I had the same problem, i'm just learning and I tried to call my local repository url but on jenkins was set the remote repository. I changed the hook to call the remote url and it works but i have the same "No Git consumers using SCM API plugin for:" stuff, curious what it is..
@hax0rdlux3 I was told the same, but managed to make it work for a specific branch so this seems to not be the only way to fix. Also from design perspective :what if the job only concerns a specific branch only?
Well, I made this workable.
One point to note that may help others ..... go careful with the Payload URL on your webhook, one gotcha I've noticed is that there is some case sensitivity involved with Jenkins.
would not trigger a multibranch pipeline with a git url of https://github.corporate.com/FOO/sample.git
Annoyingly the git webhook status is 200 in both working and non working cases, but in the broken case I saw the response body stating:
but in the working case the response body is:
No git jobs using repository: https://github.corporate.com/foo/sample.git and branches: