[ http://jira.codehaus.org/browse/MNG-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=266498#action_266498 ]
Thorsten Heit commented on MNG-4241: ------------------------------------ Today I tried to upload a site from an iMac running Mac OS X 10.6.7 via SCP to a server running Solaris 11 Express. Unfortunately I was bitten by exactly the same error: 7iv05-imac-1:uitools-mac thorsten$ mvn -e -X site:deploy Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /Users/thorsten/bin/apache-maven-3.0.3 Java version: 1.6.0_24, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: de_DE, platform encoding: MacRoman OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac" [INFO] Error stacktraces are turned on. (...) [DEBUG] org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-6:compile [DEBUG] com.jcraft:jsch:jar:0.1.38:compile [DEBUG] org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-6:compile [DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-6:compile (...) Using private key: /Users/thorsten/.ssh/id_dsa scp://7iv05-server-1/export/home/thorsten/asdasd/de.ukv.common.ui/uitools-mac - Session: Connection refused scp://7iv05-server-1/export/home/thorsten/asdasd/de.ukv.common.ui/uitools-mac - Session: Disconnecting scp://7iv05-server-1/export/home/thorsten/asdasd/de.ukv.common.ui/uitools-mac - Session: Disconnected [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.881s [INFO] Finished at: Thu May 12 17:56:12 CEST 2011 [INFO] Final Memory: 8M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:deploy (default-cli) on project uitools-mac: Error uploading site: Cannot connect. Reason: Algorithm negotiation fail -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:deploy (default-cli) on project uitools-mac: Error uploading site at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Error uploading site at org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:283) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.wagon.authentication.AuthenticationException: Cannot connect. Reason: Algorithm negotiation fail at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:264) at org.apache.maven.wagon.AbstractWagon.openConnection(AbstractWagon.java:105) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:207) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:142) at org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:250) ... 21 more Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail at com.jcraft.jsch.Session.receive_kexinit(Session.java:506) at com.jcraft.jsch.Session.connect(Session.java:285) at com.jcraft.jsch.Session.connect(Session.java:149) at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:236) ... 25 more This was with Maven 3.0.3 and maven-site-plugin:3.0-beta-3: {code} <distributionManagement> ... <site> <id>releases-site</id> <url>scp://7iv05-server-1/export/home/thorsten/asdasd/${project.groupId}/${project.artifactId}</url> </site> </distributionManagement> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.0-beta-3</version> <configuration> <locales>de</locales> </configuration> </plugin> ... {code} The problem is that m-site-p uses org.apache.maven.wagon:wagon-ssh:1.0-beta-6 which itself depends on com.jcraft:jsch:0.1.38 (see above). Switching to wagon-ssh:1.0-beta-7 doesn't solve the issue; the dependency to jsch stays the same. The solution to solve this issue is to manually add a dependency with a newer version of com.jcraft:jsch to m-site-p: {code} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.0-beta-3</version> <configuration> <locales>de</locales> </configuration> <dependencies> <dependency> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh</artifactId> <version>1.0-beta-7</version> </dependency> <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>0.1.42</version> </dependency> </dependencies> </plugin> {code} I suggest to update wagon-ssh plugin because I assume that there are others having the same issue/problem. > Upgrade JCraft to v0.1.42 > ------------------------- > > Key: MNG-4241 > URL: http://jira.codehaus.org/browse/MNG-4241 > Project: Maven 2 & 3 > Issue Type: Bug > Components: General > Affects Versions: 2.2.0 > Reporter: Serg Maslyukov > Fix For: Issues to be reviewed for 3.x > > > My provider HostGator.com update OpenSSH to latest version and when I try > connect via scp I get an error; > Caused by: org.apache.maven.wagon.authentication.AuthenticationException: > Cannot connect. Reason: Algorithm negotiation fail > at > org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:264) > at > org.apache.maven.wagon.AbstractWagon.openConnection(AbstractWagon.java:105) > at > org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:207) > at > org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:142) > at > org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:184) > ... 19 more > Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail > at com.jcraft.jsch.Session.receive_kexinit(Session.java:506) > at com.jcraft.jsch.Session.connect(Session.java:285) > at com.jcraft.jsch.Session.connect(Session.java:149) > at > org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:236) > ... 23 more > This errro exist because Maven 2.2.0 used JCraft v0.1.38. > I manually replace old version of JCraft to latest v0.1.42 and now all work > fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira