-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to configure a jenkins username and password #87
Comments
I think that the way this hook works, it just sends a notice to Jenkins along with the source repo name, maybe a few other data points. It is up to the defined jobs in Jenkins to be configured to "poll", or else they won't react to the trigger. I have some jobs configured to poll (with no polling schedule) and others not to poll, and only the former will react to a trigger event. |
Yes - that's how it works. 2014-09-13 20:34 GMT+02:00 Chuck Burgess notifications@github.com:
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen |
Correct. This plugin only sends notifications to Jenkins using an unprotected endpoint. The Git Plugin writers left this open because the server validates that there was an update/the hash is valid before starting the build. However, I'd be interested to hear about how you have your Jenkins server configured. How are you "not allowing anonymous access or triggers?" |
I interpreted that to mean that Jenkins itself has password-protected accounts, and thus only an authenticated user could start build jobs there in Jenkins. I thought his impression of the plugin was such that since Jenkins itself required a login, then this plugin needed one too in order to send the trigger notification. |
If you go to 'configure jenkins' and then you go to "Configure Global Security", in the "Authorization" section, there is an option for "Matrix-based security". In that matrix is an option for anonymous. In our system anonymous has virtually no privileges. When I try to configure this plugin on the stash side and I press the "Trigger Jenkins" button, I get just a label that says "Trying..." that never changes. |
Sorry, eventually it does finally answer with a pop-up, that says: Server Unreachable The server didn't respond. You may retry your request when the server comes back up. Which I assume is because anonymous has no permissions, and there is no way to configure a username/password to use instead. |
Ah, now that's an area in Jenkins that I've not seen. Given that view, I can better understand what you're looking for. |
The Matrix-based security stuff doesn't affect the webhook endpoint. Getting a Server Unreachable indicates a different problem. If it were an authorization error, I'd imagine something like an Unauthorized/Forbidden error. What's difficult to tell from here is who is throwing the error... it could be either for some reason the AJAX request is blowing up (can't contact your Stash server for some reason) or Stash can't talk to your Jenkins server. Here's a link with potentially more info... https://confluence.atlassian.com/display/STASHKB/Server+Unreachable+-+Timeout+when+merging+or+viewing+Diff+of+pull+request |
Well I know jenkins can talk to stash, because the 'poll scm' trigger works as a minor work around for now. I also know the URL I put into the stash webhook configuration is good, because I can cut/paste it in my browser and it takes me right to jenkins (and the URL stays the same). I would be surprised if it was my browser having a problem talking to stash. I am able to do everything else in stash just fine. Unfortunately I don't run the stash server, so I don't have the ability to look at and server side log files. |
My next step would be to have someone with access to the Stash server to run curl at the command line to the Jenkins URL. It's possible some networkish thing is in the way, possibly a firewall setting if Jenkins is not on port 80 or 443. |
Yeah... that was my thought. I'd check the network connection from Stash to Jenkins. |
Can anyone explain : Server Unreachable - "The server didn't respond. You may retry your request when the server comes back up" dialog box error all about. Please give me a possible solution for this. |
Currently there does not seem to be any place where a username/password for the jenkins server can be configured. We do not allow anonymous access or triggers on our jenkins server, and without username/password capabilities, this hook will not work for our system.
The text was updated successfully, but these errors were encountered: