You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Spilker, Jörg - bhn <Sp...@bhn-services.com> on 2010/03/22 10:24:52 UTC

Using svnant tasks always ends with authorization errors

Hello,

i´ve some problems using the svn ant tasks. I´ve downloaded the latest svnant 1.3.x and setup a small eclipse project to checkout some sources from a repository. 

However i always end up with the following error:

checkoutLatest:
      [svn] <Checkout> started ...
      [svn] Authorization failed
      [svn] svn: OPTIONS of 'http://subversion.lenze.com/bms/dam/trunk/DocApp008_mp': authorization failed: Could not authenticate to server: rejected Basic challenge (http://subversion.lenze.com)
      [svn] <Checkout> failed !

I´m absolutely sure that i supplied the correct pw in the properties file. I can work with the commandline client, with Tortoise svn and with the subclipse eclipse integration using this user and pw. But not with svnant. Is there any debugging i could enable to find out more about the reason?

Properties:

# -----------------------------------------------------------------------------
# build.properties
# This file is referenced by the sample build.xml file.
# -----------------------------------------------------------------------------

proxy.host=zde012neu.lenze.com
proxy.port=8080

bms.version=1.0

bms.latest.url=http://subversion.lenze.com/bms/dam/trunk/DocApp008_mp

bms.repository.user=spilker@lenze.com
bms.repository.passwd="XXX"

Build File:

<?xml version="1.0"?>
<!-- Sample build file used to retrieve project sources -->
<project name="svn-test" basedir="." default="checkoutLatest">
  
  <!--  all properties are in build.properties --> 
  <property file="build.properties" /> 

  <!-- path to the svnant libraries. Usually they will be located in ANT_HOME/lib -->
  <path id="svnant.classpath">
    <fileset dir="${basedir}/lib">
      <include name="**/*.jar"/>
    </fileset>
  </path>  
  
  <!-- load the svn task -->
  <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
  
  <target name="clean">
    <delete dir="src_latest"/>
    <delete dir="src_${bms.version}"/>  
  </target>

  <target name="checkoutLatest">
  	<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" nonproxyhosts="*.lenze.com" />
    <svn svnkit="false" javahl="true" username="${bms.repository.user}" password="${bms.repository.passwd}">
      <checkout url="${bms.latest.url}" revision="HEAD" destPath="src_latest" />
    </svn>
  </target>

</project>

AW: Using svnant tasks always ends with authorization errors

Posted by Spilker, Jörg - bhn <Sp...@bhn-services.com>.
Hello,

i finally found the solution. 

bms.repository.passwd="XXX"

has to be replaced by

bms.repository.passwd=XXX

Greetings, Jörg

-----Ursprüngliche Nachricht-----
Von: Spilker, Jörg - bhn [mailto:Spilker.Joerg@bhn-services.com] 
Gesendet: Montag, 22. März 2010 11:25
An: users@subversion.apache.org
Betreff: Using svnant tasks always ends with authorization errors

Hello,

i´ve some problems using the svn ant tasks. I´ve downloaded the latest svnant 1.3.x and setup a small eclipse project to checkout some sources from a repository. 

However i always end up with the following error:

checkoutLatest:
      [svn] <Checkout> started ...
      [svn] Authorization failed
      [svn] svn: OPTIONS of 'http://subversion.lenze.com/bms/dam/trunk/DocApp008_mp': authorization failed: Could not authenticate to server: rejected Basic challenge (http://subversion.lenze.com)
      [svn] <Checkout> failed !

I´m absolutely sure that i supplied the correct pw in the properties file. I can work with the commandline client, with Tortoise svn and with the subclipse eclipse integration using this user and pw. But not with svnant. Is there any debugging i could enable to find out more about the reason?

Properties:

# -----------------------------------------------------------------------------
# build.properties
# This file is referenced by the sample build.xml file.
# -----------------------------------------------------------------------------

proxy.host=zde012neu.lenze.com
proxy.port=8080

bms.version=1.0

bms.latest.url=http://subversion.lenze.com/bms/dam/trunk/DocApp008_mp

bms.repository.user=spilker@lenze.com
bms.repository.passwd="XXX"

Build File:

<?xml version="1.0"?>
<!-- Sample build file used to retrieve project sources --> <project name="svn-test" basedir="." default="checkoutLatest">
  
  <!--  all properties are in build.properties -->
  <property file="build.properties" /> 

  <!-- path to the svnant libraries. Usually they will be located in ANT_HOME/lib -->
  <path id="svnant.classpath">
    <fileset dir="${basedir}/lib">
      <include name="**/*.jar"/>
    </fileset>
  </path>  
  
  <!-- load the svn task -->
  <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
  
  <target name="clean">
    <delete dir="src_latest"/>
    <delete dir="src_${bms.version}"/>
  </target>

  <target name="checkoutLatest">
  	<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" nonproxyhosts="*.lenze.com" />
    <svn svnkit="false" javahl="true" username="${bms.repository.user}" password="${bms.repository.passwd}">
      <checkout url="${bms.latest.url}" revision="HEAD" destPath="src_latest" />
    </svn>
  </target>

</project>