"Authentication required" problem means that the server requires authentication but you didn't provide correct ISVNAuthenticationManager
implementation to SVNClientManager
. SVNKit supports different ways of authentication.
If you know what your credentials are, and they are fixed, you can use BasicAuthenticationManager
implementation.
If you want to use credentials, stored in your ~/.subversion
directory, use DefaultSVNAuthenticationManager
implementation (there's a convenient method to construct it:SVNWCUtil.createDefaultAuthenticationManager()
but note that this corresponds to Subversion commands with --non-interactive
option). Look at SVNCommandEnvironment#createClientAuthenticationManager() implementation if you need authentication manager that would allow to enter password from console.
And finally I'd like to notice that SVNClientManager is a part of obsolete (though still supported). Instead prefer SvnOperationFactory class like in my another answer, it also has setAuthenticationManager() setter.
I'm one of SVNKit developers if this matters.