logo       

Re: (Hudson) Issue #167 - SVN Update not working: msg#00038

java.hudson.user

Subject: Re: (Hudson) Issue #167 - SVN Update not working

Peter Nicolai wrote:
OK, I didn't get a prompt for password, just a red warning on the
config page that it couldn't connect, and then got some error output
when trying to build (see below).

Thanks. Can you also send me the "red warning" you got on the config page? Is that the same "svn: authentication cancelled"?

I think you really need a field to specify the user though, since
permissions can vary by user & scm path and sometimes you also want to
commit after a build, etc. That means that if your repository has
anonymous read access and hudson succeeds at connecting, you won't
have any way to specify the user you want.

The way the authentication works in Subversion is that each program that connects to the repository needs to provide a credential. There's no sticky credential information stored in the workspace, unlike CVS.

So if your build commits a change or if you manually do so, that needs to provide credential on its own, and that happens outside Hudson. IOW, as far as Hudson is concerned, all it needs is the ability to check out a workspace.

There might be other use cases where one needs to specify the user name, and if so I'd like to hear that, but this one doesn't apply, I think.

In the meantime, you can type in

http://localhost/hudson/scm/SubversionSCM/enterCredential

This worked - but does this mean it's for every project now? or every
project that uses this URL? It seems like the best thing is just to
put a username & password field in the project configs. Later I think
it would be best to implement a security model with users logging into
hudson to protect their SVN accounts, but this is just a suggestion to
make it less confusing for now.

Subversion authentication has a notion of "realm", which is the domain where the same username/password works. This is somewhat independent from URLs, but typically one subversion server installation has one realm.

Hudson stores a credential per realm, so once you enter a working credential, all other projects that access the same SVN realm will be able to use the same credential. That's why the username/password information is not stored in the project configuration --- it's almost like system level configuration, as opposed to job level configuration.


But for this to work seamlessly, it's critical that Hudson can ask you to enter a credential when you tried to use an URL that Hudson has never seen before. Apparently we are having an issue with this in your environment, so I understand why you felt that the UI is confusing. Hopefully we can get that fixed.

BTW, SVN Update works great now though!

Good.





Updating http://scrapyard/svn/PROJECTS/test_hudson
ERROR: Error in subversion
org.tmatesoft.svn.core.SVNCancelException: svn: authentication cancelled
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:44)
at
org.tmatesoft.svn.core.internal.io.dav.DAVUtil.findStartingProperties(DAVUtil.java:124)
at
org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getBaselineProperties(DAVUtil.java:197)
at
org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getBaselineInfo(DAVUtil.java:160)
at
org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:147)
at
org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:337)
at
org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:159)
at hudson.scm.SubversionSCM$3.invoke(SubversionSCM.java:378)
at hudson.scm.SubversionSCM$3.invoke(SubversionSCM.java:368)
at hudson.FilePath.act(FilePath.java:191)
at hudson.scm.SubversionSCM.update(SubversionSCM.java:368)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:223)
at hudson.model.AbstractProject.checkout(AbstractProject.java:255)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:101)
at hudson.model.Run.run(Run.java:533)
at hudson.model.Build.run(Build.java:266)
at hudson.model.Executor.run(Executor.java:61)
finished: FAILURE


--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi@xxxxxxx

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise