Maybe sometimes it is required that you give a hint to your proxy server about 
the preferred Authentication schema to use.

 

And in maven or JSVN or ANT you can't do so! Yes for all you can, J but not for 
the authentication schema to use L.

 

At least when your proxy it is configured to do NTLMV2 first before any other 
authentication schemas are considered 

Then after the initial call of your client and in case the client is just not 
intelligent enough to deal with things like negotiate

It fails L

 

So in this case it would be good to tell the proxy about the authentication 
schema to use right the first time.

 

-Dhttp.auth.preference=Basic

 

It helped me in many case.

 

i.e. just to make ANT able to do a GET to download from some external http 
repositories/resources

 

ANT was not working

MAVEN was not working

JSVN was not working

BUT

SVN and Tourtoise was working

Hell why and where is the difference?

 

0: DKB3:[JAVA$150.BIN]JAVA$JAVA.EXE;1

1: -mx640m

2: -Dhttp.auth.preference=Basic

3: -Dhttp.proxyhost=bcproxyserver.ch.xyz.com

4: -Dhttp.proxyport=8080

5: -Dhttp.proxyuser=C770001

6: -Dhttp.proxypassword=myproxypw

7: -Dant.home=/dkb3/ant_17/

8: -Djava.home=/DKB3/JAVA$150/jre

9: org.apache.tools.ant.launch.Launcher

10: -version

Apache Ant version 1.7.0 compiled on February 22 2008

 

Of course Ant will it use it to draw the version, but since I use this red 
switch ANT and MAVEN and JSVN can do it with our proxy.

 

Josef

 

Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Aravinda Dassanayake
Gesendet: Donnerstag, 17. März 2011 05:50
An: SVNKit Library Users List; Alexander Kitaev
Cc: [email protected]
Betreff: Re: SVNKit proxy support

 

Hi Alexander,

Thanks for the reply.

I am using the following authentication manager retrieval mechanisms.

SVNWCUtil.createDefaultAuthenticationManager(UsernameParam, PasswordParam)
SVNWCUtil.createDefaultAuthenticationManager()

Would this be a reason for the below issue? If so, please suggest which ones I 
would have to use.

Regards,
Aravinda

On Tue, Mar 15, 2011 at 11:09 PM, Alexander Kitaev 
<[email protected]> wrote:

Hello Aravinda,


> 1. The URL is prefixed with a username
> eg: checkout URL = https://[email protected]/projects/projectA/src

This should not be a problem.


> 2. There are proxy settings in the Tortoise SVN client which are used in the
> checkout.

> WARN [2011-03-04 19:14:16,346] - org.tmatesoft.svn.core.SVNException: svn:
> connection refused by the server

This exception most probably means that connection could not be
established. In case you're sure that HTTP requests should go through
proxy server, then there are multiple ways to instruct SVNKit to use
proxy:

1. Edit servers file. Make sure SVNKit uses it (it will not use
configuration from the 'servers' file if you set custom
ISVNAuthenticationManager implementation)

2. Set system properties, in particular 'http.proxyHost' and 'http.proxyPort'.

3. Use BasicSVNAuthenticationManager and configure proxy settings on
it (see setProxy method).

Hope this helps.

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




On 10 March 2011 07:50, Aravinda Dassanayake <[email protected]> wrote:
> Hi all,
>
> The app I have built on top of SVNKit has been talking to SVN Servers well
> so far.
>
> Now there is a scenario where I am trying to run my app on a particular URL.
> Few things I am noticing in the set up of the environment I am running the
> app.
>
> 1. The URL is prefixed with a username
> eg: checkout URL = https://[email protected]/projects/projectA/src
>
> 2. There are proxy settings in the Tortoise SVN client which are used in the
> checkout.
> I saw that SVNKit would look at the 'servers' file to get this info. But,
> the  TSVN settings do not seem to have got saved to the 'servers' file, and
> even when i tried setting the values in the file, it still kept on giving
> the same error.
> Is there anything else I need to do from the code to get the settings in?
>
> I am getting a connection refused error as below.
>
> WARN [2011-03-04 19:14:16,346] - org.tmatesoft.svn.core.SVNException: svn:
> connection refused by the server
>  WARN [2011-03-04 19:14:16,346] - svn: OPTIONS request failed on
> '/svn/custport/cwp/trunk/code/webapp/src/java'
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:103)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:87)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:618)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
>  WARN [2011-03-04 19:14:16,346] -     at
> org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
>  WARN [2011-03-04 19:14:16,361] -     at
> org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:999)
>  WARN [2011-03-04 19:14:16,361] -     at
> org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getDatedRevision(DAVRepository.java:194)
>  WARN [2011-03-04 19:14:16,361] -     at
> org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:477)
>  WARN [2011-03-04 19:14:16,361] -     at
> org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:465)
>  WARN [2011-03-04 19:14:16,361] -     at
> org.tmatesoft.svn.core.wc.SVNDiffClient.doDiffURLURL(SVNDiffClient.java:2914)
>
> Would really appreciate some guidance on this.
>
> Regards,
> Aravinda
>
>





Reply via email to