You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Duncan <st...@gmail.com> on 2005/09/25 19:45:33 UTC

[m2] Unable to Deploy via SCP with Maven 2 Beta 1

It's probably something in my environment, as I've deployed
successfully at work.  I'm trying to set things up to work at home on
my own network, and I can't get a deploy of a POM to work via SCP. 
I'm running Maven 2 on Windows XP.  The server I'm trying to copy
files to is a Debian linux box.  I can SSH to it with the username and
password in my settings.xml file using Putty and Cygwin.  I can copy
files using WinSCP.  I can copy a file using scp in Cygwin.  I'm not
sure how else to troubleshoot from here.  I know my settings.xml file
is being read, because if I get rid of the password, the error changes
to tell me that I have to provide a private key.

Here's the details:

DistributionManagement section of my pom:
        <distributionManagement>
                <repository>
                        <id>internal</id>
                        <name>Internal Respository</name>
                        <url>scp://192.168.0.101/home/maven2</url>
                </repository>
        </distributionManagement>

My settings.xml:
<settings>
        <servers>
                <server>
                        <id>internal</id>
                        <username>maven2</username>
                        <password>password</password>
                </server>
        </servers>
</settings>

Error message:

[INFO] [deploy:deploy]
[INFO] Retrieving previous build number from internal
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Diagnosis: Error deploying artifact
[INFO] ----------------------------------------------------------------------------
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: Error deploying artifact
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:154)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:45
2)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException:
Error deploying artifact:
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:89)
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:138)
        ... 16 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:
Unable to retrieve metadata
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositor
yMetadataManager.java:212)
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositor
yMetadataManager.java:183)
        at org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatestSnapshotBuildNumber(SnapshotTransform
ation.java:130)
        at org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeployment(SnapshotTransformation.java
:75)
        at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForDeployment(DefaultArtifa
ctTransformationManager.java:58)
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:62)
        ... 17 more
Caused by: org.apache.maven.wagon.TransferFailedException:
Authentication failed:
        at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:401)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:256)
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositor
yMetadataManager.java:198)
        ... 22 more
Caused by: org.apache.maven.wagon.authentication.AuthenticationException:
Cannot connect. Reason: Auth fail
        at org.apache.maven.wagon.providers.ssh.ScpWagon.openConnection(ScpWagon.java:164)
        at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:123)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:310)
        ... 24 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
        at com.jcraft.jsch.Session.connect(Unknown Source)
        at com.jcraft.jsch.Session.connect(Unknown Source)
        at org.apache.maven.wagon.providers.ssh.ScpWagon.openConnection(ScpWagon.java:158)
        ... 26 more

--
Stephen Duncan Jr
www.stephenduncanjr.com

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


Re: [m2] Unable to Deploy via SCP with Maven 2 Beta 1

Posted by Brett Porter <br...@gmail.com>.
For the record, this was because plain text passwords were not enabled
on the server (different to keyboard-interactive).

- Brett

On 9/26/05, Brett Porter <br...@gmail.com> wrote:
> We've seen this with a couple of people using passwords, though it
> works for me. It's possibly the server settings not allowing a
> password based login.
>
> Auth fail means it connected, but did not authenticate. I'm not sure
> if we can get jsch to log any more, so the best way to debug is
> probably to check the ssh server logs if you can. It will indicate
> what you attempted.
>
> - Brett
>
> On 9/26/05, Stephen Duncan <st...@gmail.com> wrote:
> > It's probably something in my environment, as I've deployed
> > successfully at work.  I'm trying to set things up to work at home on
> > my own network, and I can't get a deploy of a POM to work via SCP.
> > I'm running Maven 2 on Windows XP.  The server I'm trying to copy
> > files to is a Debian linux box.  I can SSH to it with the username and
> > password in my settings.xml file using Putty and Cygwin.  I can copy
> > files using WinSCP.  I can copy a file using scp in Cygwin.  I'm not
> > sure how else to troubleshoot from here.  I know my settings.xml file
> > is being read, because if I get rid of the password, the error changes
> > to tell me that I have to provide a private key.
>

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


Re: [m2] Unable to Deploy via SCP with Maven 2 Beta 1

Posted by Brett Porter <br...@gmail.com>.
We've seen this with a couple of people using passwords, though it
works for me. It's possibly the server settings not allowing a
password based login.

Auth fail means it connected, but did not authenticate. I'm not sure
if we can get jsch to log any more, so the best way to debug is
probably to check the ssh server logs if you can. It will indicate
what you attempted.

- Brett

On 9/26/05, Stephen Duncan <st...@gmail.com> wrote:
> It's probably something in my environment, as I've deployed
> successfully at work.  I'm trying to set things up to work at home on
> my own network, and I can't get a deploy of a POM to work via SCP.
> I'm running Maven 2 on Windows XP.  The server I'm trying to copy
> files to is a Debian linux box.  I can SSH to it with the username and
> password in my settings.xml file using Putty and Cygwin.  I can copy
> files using WinSCP.  I can copy a file using scp in Cygwin.  I'm not
> sure how else to troubleshoot from here.  I know my settings.xml file
> is being read, because if I get rid of the password, the error changes
> to tell me that I have to provide a private key.

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