Hudson: SVN authentication failure
Recently, we've been trying Hudson server at work. It has some cool features you can read about at Hudson Wiki, so let's focus on that topic. Basically, we're trying to deploy our projects from latest revision at our SVN repository and after sucessful build commit whole project in to STABLE tag, using:
According to an image from their wiki, configuration looks pretty simple. Just fill up repository url and the link for entering your credentials will magically appear.
It didn't. However, Hudson build was successful, no errors reported. The only thing that will tell you something's wrong is the job console log. And here you can find, that tagging plugin wasn't able to commit to your repository because of missing credentials. So I just need to fill those credentials...- Under your job settings, simply fill up the url providing fake credentials like
http://root:root@server/repo/and the paragraph with link should appear, or - visit the direct url for entering credentials, which should be http://HUDSON_URL/scm/SubversionSCM/enterCredential (Hudson version 1.380)
Tears came to my eyes after seeing that magical from for entering credentials and I thought, "Hell yeah, good job!" False! After entering URL and credentials ( we're using basic user/password ) another problem came up.
ERROR: svn: No credential to try. Authentication failed org.tmatesoft.svn.core.SVNCancelException: svn: No credential to try. Authentication failed
Well after a few minutes, I've realized that this message is as simple as crappy it looks. It says, "there are no credentials to try, because there is no need to do that" - your repository is accessed on provided url and Hudson didn't ask for credentials. The solution for this is simple, you need to deny anonymous access to your repository and form will pass. You can turn it back on after providing credentials and everything stays fine.
So that's it, hopefully it will be helpful for someone.
Resources:
- http://weblogs.java.net/blog/2009/03/12/hudson-svncancelexception-no-credential-try-authentication-failed
- http://teabreak.pk/changing-subversion-credentials-in-hudson-181/8824/
- http://issues.hudson-ci.org/browse/HUDSON-2073
- http://hudson.361315.n4.nabble.com/Problem-with-different-Subversion-credentials-td2075037.html

