Authentication problem

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

Authentication problem

by emailuser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all!

I have problems to authenticate with svnkit(1.3.1) at my svnserver. I have tried i with java code and by using jsvn from commandline.


This is my java-code:

    final String url = "http://svnserver-1/svn/test";
    final File dest = new File("C:\temp");
    final String name = "ka\\guest";
    final String password = "123";

    System.setProperty("svnkit.http.methods", "Basic,Digest,NTLM");

    DAVRepositoryFactory.setup();
    SVNRepository repos = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url));
    ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password);
    repos.setAuthenticationManager(authManager);

    SVNClientManager clientManager = SVNClientManager.newInstance();
    SVNUpdateClient updateClient = clientManager.getUpdateClient();
    updateClient.setIgnoreExternals(false);

    updateClient.doCheckout(SVNURL.parseURIEncoded(url), dest, SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY, true);



Also when I try it from the commandline:

    jsvn checkout --username ka\guest --password 123 --non-interactive --no-auth-cache http://svnserver-1/svn/test

i get this errormessage in both cases:

svn: Authentication required for '<http://svnserver-1:80>'


Also i have another svn commandline client (CollabNetSubversion-client-1.6.1) on my pc, which runs fine.

Using svn from commandline is no solution for me, because i need to use a svn java api.

What im doing wrong?

Thanks in advance,
Andreas
--




GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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


Re: Authentication problem

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Andreas,

Looks like NTLM-related problem. What if you use user name without
domain name specified?

System property you're setting, forces SVNKit to use "Basic"
authentication method first, if it is supported by the server. So, there
could be different scenarios:

1. Basic method is not supported by the server, NTLM is tried and it
doesn't work as expected.

2. Basic method is supported, but requires user name without domain to
be specified, or in some other form (e.g. "domain@user").

Could you please also get debug log for SVNKit and send it to me (see
https://wiki.svnkit.com/Troubleshooting on how to get debug log).

SVNKit does have unresolved issues with NTLM support this is why we
recommend to enable Basic fall-back option on the server side and to set
system property on the client that forces Basic authentication method.

We also provide Negotiate authentication support, which could be used in
certain environments to wrap NTLM. This support is also not yet stable
enough and may not work in some cases. I expect this to be fixed in the
next minor release of SVNKit (1.3.2).

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

emailuser@... wrote:

> Hi all!
>
> I have problems to authenticate with svnkit(1.3.1) at my svnserver. I have tried i with java code and by using jsvn from commandline.
>
>
> This is my java-code:
>
>     final String url = "http://svnserver-1/svn/test";
>     final File dest = new File("C:\temp");
>     final String name = "ka\\guest";
>     final String password = "123";
>
>     System.setProperty("svnkit.http.methods", "Basic,Digest,NTLM");
>
>     DAVRepositoryFactory.setup();
>     SVNRepository repos = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url));
>     ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password);
>     repos.setAuthenticationManager(authManager);
>
>     SVNClientManager clientManager = SVNClientManager.newInstance();
>     SVNUpdateClient updateClient = clientManager.getUpdateClient();
>     updateClient.setIgnoreExternals(false);
>
>     updateClient.doCheckout(SVNURL.parseURIEncoded(url), dest, SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY, true);
>
>
>
> Also when I try it from the commandline:
>
>     jsvn checkout --username ka\guest --password 123 --non-interactive --no-auth-cache http://svnserver-1/svn/test
>
> i get this errormessage in both cases:
>
> svn: Authentication required for '<http://svnserver-1:80>'
>
>
> Also i have another svn commandline client (CollabNetSubversion-client-1.6.1) on my pc, which runs fine.
>
> Using svn from commandline is no solution for me, because i need to use a svn java api.
>
> What im doing wrong?
>
> Thanks in advance,
> Andreas

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