I'm completely stumped by an SVNKit (1.8.5) error that I'm running in to. I'm using the following pattern to build up an Authentication Manager:
public static SVNRepository getSvnRepository(String userName, String pass, String repoURL) throws SVNException
{
SVNRepository repository;
repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(repoURL));
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(userName, pass);
repository.setAuthenticationManager(authManager);
return repository;
}
I use this pattern in several places to make sure that the user can authenticate against the repository, to get a listing of all of the folders in the repository, and even to explore the top level of the subfolders in order to parse a file and build up a dependency graph. All of this succeeds.
But when I attempt to run a checkout, I get an authentication error. Puzzlingly, this error only happens on one computer at our office. Several other computers all running OS X, Windows, and various versions of Ubuntu take no issue with this process and can check out no problem but one particular computer running Ubuntu 12.10 fails hard trying to run the following:
SVNRepository repository = getSvnRepository(userName, pass, url + "/" + subfolder);
SvnOperationFactory factory = new SvnOperationFactory();
SvnCheckout checkout = factory.createCheckout();
checkout.setSource(SvnTarget.fromURL(repository.getLocation()));
checkout.setSingleTarget(SvnTarget.fromFile(location.resolve(project).toFile()));
checkout.run();
The stack trace:
org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '<https://[snip]:443>'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:47)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:41)
at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getFirstAuthentication(DefaultSVNAuthenticationManager.java:186)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:682)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:371)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:359)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:710)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:627)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:102)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1032)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:175)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:118)
at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:182)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:45)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:756)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:16)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:10)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1149)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)