ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: CVS with SSH
Date Fri, 03 Apr 2009 14:27:08 GMT
2009/4/2 Henning Lötsch <>:
> Hello David,
> i found:
> In addition to pserver, CVS supports the ext method (which uses an
> external connection program, such as rsh or ssh), kserver (for the
> Kerberos security system version 4), and gserver (which uses the GSSAPI,
> or Generic Security Services API, and also handles Kerberos versions 5
> and higher). These methods are similar to pserver, but each has its own
> idiosyncrasies.
> at:

I know you have to use the "ext" method, but the default behavior for
the "ext" method is to call the "rsh" command and not the "ssh"
command. CVS does this through an "exec" call in the program. If you
have multiple "rsh" programs, CVS will use the first one it finds in
its path. If you want to run a specific version of "rsh" or you want
to use "ssh" instead, you need to set CVS_RSH to that program.

The question I originally had was how do you set the environment
variable "CVS_RSH" in an Ant script in order to be able to use ssh and
not rsh. If you didn't setup CVS_RSH in your environment before
running Ant, you're stuck because you can't set an environment
variable inside of Ant. That's why I thought you had to go with the
<exec> call.

However, I did discover that you can set CVS_RSH inside your CVSROOT
which makes it easier. Once you specify the "ext" protocol, you use
semi-colons to separate out the settings of the environment variables.
After you finish, you would put a colon, and then the user@system

<cvs command="co"

Note that you have:

In the end, the CVS Ant task merely calls the CVS command, so it isn't
any different than simply using the <exec> task to begin with. Using
the <cvs> task is similar to running this <exec> task:

<exec executable="cvs">
   <arg value="-d"/>
   <arg value=":ext;CVS_RSH=${ssh.cmd}:${user}@${server}:${cvsroot.dir}"
   <arg value="co"/>
   <arg value="-d"/>>
   <arg value="${dest}"/>
   <arg value="${package}"/>

David Weintraub

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message