Getting Hudson to work with SVN on Apache and mod_sspi
If you’ve got Subversion running in Apache httpd on Windows, you might well have installed mod_auth_sspi to get single signon. I’d definitely recommend it, but it does have it’s down sides. In this particular case, I just couldn’t get hudson to authenticate even though I was sure I was giving the right username and password.
It turns out that hudson uses svnkit, and svnkit has some trouble with Negotiate (sspi) authentication, so you need to force it to use Basic or NTLM authentication instead. This can be done with a system property: -Dsvnkit.http.methods=Basic,NTLM
Now if you are running hudson as a service and need to set this property, you need to put it in hudson.xml, like so:
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dsvnkit.http.methods=Basic,NTLM -jar "%BASE%\hudson.war" --httpPort=8180 --ajp13Port=8109</arguments>
I actually solved this problem twice about 6 months apart. The second time I knew I had seen the answer before, but couldn’t easily find it by searching the web, so I’m documenting so I can find it again next time I get this problem. Unhelpfully, this hudson wiki page on sspi doesn’t cover this issue! There is some more info about setting the href=”http://old.nabble.com/login-failed,-authentication-cancelled-message-td26370248.html”>svnkit.http.methods property in this thread.
If this helped you, please give feedback.
ⓓ
Categories: Uncategorized
