0

My svn admin require us to install a pfx client cert file on our windows machine to connect. I tried that and have no problem connecting to svn with TortoiseSVN.

Now I need to write an ant script and use svnkit inside to checkout/update. How do I specify the client file?

<java classname="org.tmatesoft.svn.cli.SVN" dir="src" fork="true">
            <arg value="co" />
            <arg value="--username" />
            <arg value="xxxxx" />
            <arg value="--password" />
            <arg value="xxxx" />
            <arg
                value="https://123.456.789.123/xxx/xxx" />
            <classpath>
                <pathelement location="lib/antlr-runtime-3.4.jar" />
                <pathelement location="lib/jna-3.4.0.jar" />
                <pathelement location="lib/sequence-library-1.0.2.jar" />
                <pathelement location="lib/sqljet-1.1.3.jar" />
                <pathelement location="lib/svnkit-javahl16-1.7.5.jar" />
                <pathelement location="lib/trilead-ssh2-1.0.0-build215.jar" />
                <pathelement location="lib/svnkit-1.7.5.jar" />
                <pathelement location="lib/svnkit-cli-1.7.5.jar" />
            </classpath>
        </java>
GaryX
  • 737
  • 1
  • 5
  • 20

1 Answers1

0

I don't know what a "pfx client cert file" is, but I'm assuming you're talking about a Java truststore?

Try adding the standard ssl properties to the Java program as follows:

<java classname="org.tmatesoft.svn.cli.SVN" dir="src" fork="true">
   <sysproperty key="javax.net.ssl.keyStore" value="client.keystore" />
   <sysproperty key="javax.net.ssl.keyStorePassword" value="123456" />
   <sysproperty key="javax.net.ssl.trustStore" value="client.truststore" />
   <sysproperty key="javax.net.ssl.trustStorePassword" value="123456" /> 
   ..   

Reference:

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185