Hi Graham,

To use credentials from ~/.subversion directory one can create auth manager 
with 
SVNWCUtil#createDefaultAuthenticationManager and pass it to the object that 
interacts with the SVN 
repository (depending on abstraction level it can be SVNRepository, 
ISVNRepositoryPool, 
SVNOperationFactory or SVNClientManager) via setAuthenticationManager() call.

For details of ~/.subversion directory support look at the sources of this 
class 
DefaultSVNAuthenticationManager.

SVNAuthentication class represent just different credentials like 
"user/password" or "private 
key/passphrase". DefaultSVNAuthenticationManager involves all Subversion 
behaviour (including 
passwords prompt, caching, encryption, providing proxy settings and so on).

If you want SVNKit to use credentials ~/.subversion in read-only mode, create 
DefaultSVNAuthenticationManager with 
SVNWCUtil#createDefaultAuthenticationManager that accepts 'storeAuth' (there're 
several methods with 
this name) passing 'false' as the value.

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

> Hi all,
> 
> Svnkit can read subversion's native configuration files in the .subversion
> directory, and this seems to work fine. The Jenkins Subversion plugin,
> which uses svnkit, cannot read the subversion native configuration files
> in the .subversion directory, nor can it support client certificates on
> slaves, and I am trying to patch the plugin to work like svnkit does and
> just read the native subversion config files.
> 
> I am confused about exactly how svnkit implements the native subversion
> configuration directory.
> 
> I have found the
> http://svnkit.com/javadoc/org/tmatesoft/svn/core/auth/SVNAuthentication.ht
> ml class, which gives me 4 different implementations, password, ssh, ssl
> and username. These are the four options used by the jenkins subversion
> plugin.
> 
> Which of these four classes (if any) should I be using if I just want to
> revert to the native subversion config files and nothing else?
> 
> Am I looking at the right code?
> 
> What I want svnkit to do is connect to a repository, following the native
> subversion client's exact behaviour of reading and parsing
> .subversion/servers to work out the credentials to send to the server. I
> want to completely disable any attempt by Jenkins to fiddle with
> credentials. Would it be possible to show me what code I should be using
> to do this?
> 
> Regards,
> Graham
> --

Reply via email to