You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dmitry Beransky <dm...@gmail.com> on 2007/01/03 22:39:56 UTC

site:deploy via ssh under Windows

Hi,

I've found a few posts asking a similar question, but there were no
answers as far as I could tell...

I want to run a site:deploy via an external ssh and get this error message:

   Embedded error: Error performing commands for file transfer
   Exit code 1 - 'ssh' is not recognized as an internal or external command,
   operable program or batch file.

here's what my pom looks like:

    <distributionManagement>
        <site>
            <id>csa-repository</id>
            <url>scpexe://maven-remote:xxxxx@newzealand/Storage/web/iris2</url>
        </site>
    </distributionManagement>

and settings.xml:

<servers>
    <server>
      <id>csa-repository</id>
      <username>maven-remote</username>
      <passphrase>xxxxx</passphrase>
      <configuration>
        <sshExecutable>c:\winnt\plink.exe</sshExecutable>
        <scpExecutable>c:\winnt\pscp.exe</scpExecutable>
      </configuration>
     </server>
  </servers>


According to the docs, this is all I need.  What am I missing?


Thanks
D.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: site:deploy via ssh under Windows

Posted by Barrie Treloar <ba...@gmail.com>.
On 1/4/07, Dmitry Beransky <dm...@gmail.com> wrote:
> On 1/3/07, Barrie Treloar <ba...@gmail.com> wrote:
> > This is because you are missing the directory ~/.ssh so that the file
> > known_hosts can be created.
>
> d'oh!  that was it.  thanks!

Your welcome.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: site:deploy via ssh under Windows

Posted by Dmitry Beransky <dm...@gmail.com>.
On 1/3/07, Barrie Treloar <ba...@gmail.com> wrote:
> This is because you are missing the directory ~/.ssh so that the file
> known_hosts can be created.

d'oh!  that was it.  thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: site:deploy via ssh under Windows

Posted by Barrie Treloar <ba...@gmail.com>.
On 1/4/07, Dmitry Beransky <dm...@gmail.com> wrote:
> I'm using scp with a password based authentication.  While I have no
> problems running the command from my workstation, if I run the same
> build on the continous build box, I'm constantly being asked to accept
> RSA key fingerprint.  Perhaps, switching to a key-based login would
> fix the problem.

This is because you are missing the directory ~/.ssh so that the file
known_hosts can be created.

You would have done this as part of your windows setup but it is easy to miss.

Double check the location of your user home, it could also be that
while you are logged in as a user on windows that the home directory
is incorrectly C:\Documents and Settings\Default/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: site:deploy via ssh under Windows

Posted by Dmitry Beransky <dm...@gmail.com>.
I'm using scp with a password based authentication.  While I have no
problems running the command from my workstation, if I run the same
build on the continous build box, I'm constantly being asked to accept
RSA key fingerprint.  Perhaps, switching to a key-based login would
fix the problem.

On 1/3/07, Barrie Treloar <ba...@gmail.com> wrote:
> Is there a reason for wanting an external ssh?
>
> I am on windows and use putty but I have not configured external ssh.
> [...]
> In my settings.xml I have:
>
>    <server>
>      <id>inhouse</id>
>      <username>USER</username>
>      <privateKey>/PATH/TO/KEY.openssh</privateKey>
>      <filePermissions>664</filePermissions>
>      <directoryPermissions>775</directoryPermissions>
>    </server>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: site:deploy via ssh under Windows

Posted by Barrie Treloar <ba...@gmail.com>.
On 1/4/07, Dmitry Beransky <dm...@gmail.com> wrote:
> Hi,
>
> I've found a few posts asking a similar question, but there were no
> answers as far as I could tell...
>
> I want to run a site:deploy via an external ssh and get this error message:

Is there a reason for wanting an external ssh?

I am on windows and use putty but I have not configured external ssh.

My distribution section looks like:
  <distributionManagement>
    <repository>
      <id>inhouse</id>
      <name>Inhouse Internal Release Repository</name>
      <url>
        scp://HOST/usr/local/www/default/maven2_repositories/inhouse
      </url>
    </repository>
    <snapshotRepository>
      <id>inhouse_snapshot</id>
      <name>Inhouse Internal Snapshot Repository</name>
      <url>
        scp://HOST/usr/local/www/default/maven2_repositories/inhouse_snapshot
      </url>
    </snapshotRepository>
    <site>
      <id>website</id>
      <url>
        scp://HOST/usr/local/www/default/projects/MY_PROJECT
      </url>
    </site>
  </distributionManagement>

In my settings.xml I have:

    <server>
      <id>inhouse</id>
      <username>USER</username>
      <privateKey>/PATH/TO/KEY.openssh</privateKey>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
    </server>
    <server>
      <id>inhouse_snapshot</id>
      <username>USER</username>
      <privateKey>/PATH/TO/KEY.openssh</privateKey>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
    </server>
    <server>
      <id>website</id>
      <username>USER</username>
      <privateKey>/PATH/TO/KEY.openssh</privateKey>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
    </server>

Where the key file was saved generated in putty, and exported via
Converstions -> Export OpenSSH key.  This key file doesnt have a
passphrase (which isn't the best security) but it avoids being
prompted for it during deployment.


Maven happily uses scp and deploys my artifacts without having a "ssh"
executable in my path.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org