mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

after upgrade to 2.3.0 (with stash 2.9.4) get following error. #53

Closed rpguidewire closed 10 years ago

rpguidewire commented 10 years ago

https://answers.atlassian.com/questions/270266/new-version-of-jenkins-webhook-for-stash-giving-error-with-stash-2-9?page=1#270282

mikesir87 commented 10 years ago

A few questions...

rpguidewire commented 10 years ago

yes i saw it in at least 2 repositories. Jenkins ver. 1.530 Git Plugin: 2.0.3

mikesir87 commented 10 years ago

Try running this command and see if you get the same error back.

curl http://yourserver/jenkins/git/notifyCommit?url=<SSH/HTTP Clone URL>
rpguidewire commented 10 years ago
Error 404

Status Code: 404

Exception:
Stacktrace:
(none)


Generated by Winstone Servlet Engine v0.9.10 at Fri Mar 07 14:30:18 PST 2014
rpguidewire commented 10 years ago

the above is return i get with that command

mikesir87 commented 10 years ago

Hmm... can you paste the exact command you used? Feel free to remove the hostname. You shouldn't at least be getting a 404 back.

rpguidewire commented 10 years ago

curl http://build/jenkins/git/notifyCommit?url=ssh://git@stash/live/liveanalytics.git

mikesir87 commented 10 years ago

Assuming that you have the hostnames correct, you shouldn't be getting a 404 from Jenkins. Are you sure the Git plugin is enabled in Jenkins? Even if the repo url (the parameter part) wasn't correct, you'd get back a page saying "No git jobs using repository: [your repository provided in the url]".

rpguidewire commented 10 years ago

i tried the username and password too curl -u still same error. can you suggest some other way to debug ?

mikesir87 commented 10 years ago

The reason I was asking you to do that is because that's all that this plugin does. It simply makes a request to the endpoint that the Git Plugin makes available, providing the repo URL you had configured. The problem, based on your original exception, is a problem with the Git Plugin in Jenkins, not with this Stash webhook plugin.

I wanted to see if we could duplicate it again, outside of Stash, to help prove that before we send it off to the Git Plugin issue tracker. You can try the URL using a web browser as well. But, you'll need to figure out the URL endpoint before I can really help out too much more. A link to their documentation is found below:

https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Pushnotificationfromrepository

I'm going to go ahead and close this issue, as it's not an issue with this plugin. But, I'd still be happy to help you resolve your issue. Please feel free to continue to continue the discussion with the issue closed.