You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Guillaume Lederrey <gu...@gmail.com> on 2011/04/01 18:17:21 UTC

Storing proxy passwords when using SvnAnt

Hello !

I am trying to use SvnAnt with its JavaHL bindings. My networks
require the use of a proxy that is authenticated. If I specy my
username and password in C:\Documents and Settings\<user>\Application
Data\Subversion\servers, my script works without any problem. But
storing a password unencrypted is of course against company policies
... So I am looking for an alternative solution.

I have a test Ant target that I use :

    <target name="test-svn">
        <svn username="${user.name}"
             password="${svn.password}">
            <update dir="${basedir}" recurse="true" />
        </svn>
    </target>

This target works if the pasword to the proxy is in the the "servers"
config file. It doesnt otherwise.

I tried to modify this target to explicitely set the proxy :

    <target name="test-svn">
        <setproxy proxyhost="proxy.mynetwork.com"
                  proxyport="8080"
                  proxypassword="${proxy.password}"
                  proxyuser="myuser" />
        <svn username="${user.name}"
             password="${svn.password}">
            <update dir="${basedir}" recurse="true" />
        </svn>
    </target>

This way, I could prompt the user for its password everytime and not
store it. But of course, this "setproxy" only sets a Java proxy...
doesnt work...

Is there a work around to have svn eaither ask the user for its
password or have it stored in a secured way ?

  Thanks for your help !


     Guillaume


-- 
mobile : +41 76 573 32 40
skype : Guillaume.Lederrey

projects :
* http://rwanda.ledcom.ch/
* http://trock.ch/
others :
* http://kiva.org/

Re: Storing proxy passwords when using SvnAnt

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Guillaume Lederrey wrote on Fri, Apr 01, 2011 at 18:17:21 +0200:
> I am trying to use SvnAnt with its JavaHL bindings. My networks
> require the use of a proxy that is authenticated. If I specy my
...
> Is there a work around to have svn eaither ask the user for its
> password or have it stored in a secured way ?

No to both of these.

You can use 'svn --config-option' to inject values (that are normally
stored in the 'servers' file) on a per-command basis.  But having the
password on the command-line may make it visible to other processes.