authentication issues

View: New views
2 Messages — Rating Filter:   Alert me  

authentication issues

by latchkey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I'm using svnkit-1.2.0.4402, on OSX 10.5.x with Java 6.

I'd like to do the equivalent of 'svn info' for a checked out working copy sitting on my disk. This working copy is checked out of a svn server via a https:// url. The problem is that when I run my code, it throws the Exception...  org.tmatesoft.svn.core.SVNAuthenticationException: svn: Authentication required for '<https://svn.domain.com:443>'.

I soon realized that my problem was that I had used SVNRevision.HEAD instead of SVNRevision.WORKING. That solved the problem by not making a network connection. But then, I thought through things a bit more and realized that the authentication problem really shouldn't exist anyway because I do have a valid checkout with a saved password already. Heck, the checkout that I'm using was made in the first place with svnkit using subclipse and eclipse 3.4.

Here is the basics of my code:

ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager();
DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);
SVNClientManager manager = SVNClientManager.newInstance(options, authManager);
SVNWCClient client = manager.getWCClient();
SVNInfo info = client.doInfo(new File(path), SVNRevision. WORKING);
SVNRevision revision = info.getRevision();

thanks for your help.

jon

Re: authentication issues

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

SVNKit default authentication manager uses cached credentials from
default Subversion cache (~/.subversion/auth/). However, when used
within Eclipse, SVNKit uses Eclipse specific authentication storage to
cache credentials (so called keyring file).

This is why credentials cached by Subclipse are not available for your
standalone application. You may pass your username and password to
SVNWCUtil.createDefaultAuthenticationManager method and those
credentials will be then cached in default Subversion credentials
storage unless caching is not disabled in Subversion configuration file
(~/.subversion/config).

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

latchkey wrote:

> Hi there,
>
> I'm using svnkit-1.2.0.4402, on OSX 10.5.x with Java 6.
>
> I'd like to do the equivalent of 'svn info' for a checked out working copy
> sitting on my disk. This working copy is checked out of a svn server via a
> https:// url. The problem is that when I run my code, it throws the
> Exception...  org.tmatesoft.svn.core.SVNAuthenticationException: svn:
> Authentication required for '<https://svn.domain.com:443>'.
>
> I soon realized that my problem was that I had used SVNRevision.HEAD instead
> of SVNRevision.WORKING. That solved the problem by not making a network
> connection. But then, I thought through things a bit more and realized that
> the authentication problem really shouldn't exist anyway because I do have a
> valid checkout with a saved password already. Heck, the checkout that I'm
> using was made in the first place with svnkit using subclipse and eclipse
> 3.4.
>
> Here is the basics of my code:
>
> ISVNAuthenticationManager authManager =
> SVNWCUtil.createDefaultAuthenticationManager();
> DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);
> SVNClientManager manager = SVNClientManager.newInstance(options,
> authManager);
> SVNWCClient client = manager.getWCClient();
> SVNInfo info = client.doInfo(new File(path), SVNRevision. WORKING);
> SVNRevision revision = info.getRevision();
>
> thanks for your help.
>
> jon
>

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...