Hello Michael,
To create an authentication manager that uses settings from ~/.subversion 
directory use 
SVNWCUtil#createDefaultAuthenticationManager.

If you want to look at credential that it provides --- usually one haven't to 
look at those 
credentials --- use ISVNAuthenticationProvider#getFirstAuthentication 
ISVNAuthenticationProvider#getNextAuthentication.  SVNAuthentication class (and 
its subclasses) is 
an abstraction for credentials.

The most common code to use :

final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
final ISVNAuthenticationManager authenticationManager = 
SVNWCUtil.createDefaultAuthenticationManager();
svnOperationFactory.setAuthenticationManager(authenticationManager);
try {
    // any operations,
    final SvnCheckout checkout = svnOperationFactory.createCheckout();
    checkout.setSource(SvnTarget.fromURL(url));
    checkout.setSingleTarget(SvnTarget.fromFile(workingCopyDirectory));
    checkout.run();

} finally {
    svnOperationFactory.dispose();
}

--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge

> Hello,
> 
> having a "ISVNAuthenticationProvider authenticationProvider", how can I
> get credentials to be used to access a Subversion repository with a
> command like "svn --username YYY --password XXX status". In other words,
> I'd like to re-use stored credentials dynamically to access a repo, but
> I'm not sure how to do it. Background: I'm inside a build server plugin,
> which uses the SVNKit.
> 
> 
> Thank you.
> 
> 
> Regards
> Michael

Reply via email to