How to make svnant/svnkit prompt for a username/password

antsvnsvnantsvnkit

I have an Ant script that needs to checkout a directory from Subversion. This works using svnant/svnkit. However, Subversion access is authenticated, and I do not want to store my user password in a file.

Can I make svnkit pop up a password dialog?
Or even better, make it use the same credential caching that subversive/svnkit inside of Eclipse uses (the username can be read from the build.properties)?

I cannot switch to public key based authentication, as I do not control the subversion server.

Right now, it just says "svn: authentication cancelled".

Best Answer

An analog to this answer:

<input message="password:>" addproperty="password">
      <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
</input>

This will make it so that the person's username is not displayed. This requires Ant 1.7.1 or greater.

Related Topic