[ http://jira.codehaus.org/browse/WAGONSSH-53?page=comments#action_82483 ] Igor Tkach commented on WAGONSSH-53: ------------------------------------
I experience the same problem. After manually adding .ssh maven does write 'known_hosts', but then it happily ignores it and keeps asking 'Are you sure you want to continue connecting?' or in batch mode simply fails. > Error deploying artifact: Authentication failed: Cannot connect. Reason: > ------------------------------------------------------------------------- > > Key: WAGONSSH-53 > URL: http://jira.codehaus.org/browse/WAGONSSH-53 > Project: wagon-ssh > Issue Type: Bug > Environment: My operating system is unix > sun4-cross: uname -a > SunOS swdc-sf06e 5.8 Generic_117350-24 sun4u sparc SUNW,Sun-Fire-15000 > Reporter: sharda sheshabhattar > > Hi, > I am having problems using Maven deploy feature in the non interactive mode. > However the same command ,when used in the interactive mode works fine. It > prompts me for > The authenticity of host 'dsddb2d-swdc' can't be established. > DSA key fingerprint is 09:a4:e9:e9:44:2e:59:d0:91:40:09:47:32:91:39:be. > Are you sure you want to continue connecting? (yes/no): > It proceeds when I type yes.It prompts me about 4-5 times for each deploy. > I need to urgently develop something and make this work in the > non-interactive mode. Please help > Regards, > Sharda > Here is the trace output when I run in the non-interactive mode: > > /xenv/Maven/X/2.0.4/bin/mvn -s settings.xml deploy:deploy-file > -DpomFile=commons-digester-1.5.pom -Dr > epositoryId=nyhub1 -Durl=scp://nyhub1/xenv/scripts/Hermesmvnrep > -Dfile=/xenv/commons-digester/X/1.5/l > ib/commons-digester.jar > + Error stacktraces are turned on. > Maven version: 2.0.4 > [DEBUG] Building Maven user-level plugin registry from: > '/home/sunle/.m2/plugin-registry.xml' > [DEBUG] Building Maven global-level plugin registry from: > '/xenv/Maven/X/2.0.4/conf/plugin-registry.x > ml' > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'deploy'. > [DEBUG] maven-deploy-plugin: resolved to version 2.2.1 from repository central > [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for > project: null:maven-depl > oy-plugin:maven-plugin:2.2.1 from the repository. > [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: > org.apache.maven.plugins > :maven-plugins:pom:1 from the repository. > [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: > org.apache.maven:maven-parent:pom:1 > from the repository. > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building Maven Default Project > [INFO] task-segment: [deploy:deploy-file] (aggregator-style) > [INFO] > ---------------------------------------------------------------------------- > [DEBUG] > org.apache.maven.plugins:maven-deploy-plugin:maven-plugin:2.2.1:runtime > (selected for runtime > ) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-artifa > ct-manager:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected > for runtime) > [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for > runtime) > [DEBUG] > org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime > (selected for runtim > e) > [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for > runtime) > [DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-artifa > ct:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for > runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-reposi > tory-metadata:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime > (selected for runtime) > [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime > (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > null:maven-project:jar:2.0 fr > om the repository. > [DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for > runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-model: > jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for > runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > null:maven-profile:jar:2.0 fr > om the repository. > [DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for > runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-core:j > ar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-core:jar:2.0:runtime (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > null:maven-plugin-parameter-d > ocumenter:jar:2.0 from the repository. > [DEBUG] > org.apache.maven:maven-plugin-parameter-documenter:jar:2.0:runtime (selected > for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > null:maven-error-diagnostics: > jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-error-diagnostics:jar:2.0:runtime > (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-monito > r:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-monitor:jar:2.0:runtime (selected for > runtime) > [DEBUG] > org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:runtime > (selected for runtim > e) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > null:maven-settings:jar:2.0 f > rom the repository. > [DEBUG] org.apache.maven:maven-settings:jar:2.0:runtime (selected for > runtime) > [DEBUG] > org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-5:runtime > (selected for runti > me) > [DEBUG] org.apache.maven.wagon:wagon-file:jar:1.0-alpha-5:runtime > (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-plugin > -descriptor:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-plugin-descriptor:jar:2.0:runtime > (selected for runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-plugin > -api:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for > runtime) > [DEBUG] commons-cli:commons-cli:jar:1.0:runtime (selected for runtime) > [DEBUG] org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-5:runtime > (selected for runtime) > [DEBUG] com.jcraft:jsch:jar:0.1.23:runtime (selected for runtime) > [DEBUG] Retrieving parent-POM: > org.apache.maven.reporting:maven-reporting::2.0 for project: null:mave > n-reporting-api:jar:2.0 from the repository. > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven.reporting:ma > ven-reporting:pom:2.0 from the repository. > [DEBUG] org.apache.maven.reporting:maven-reporting-api:jar:2.0:runtime > (selected for runtime) > [DEBUG] doxia:doxia-sink-api:jar:1.0-alpha-4:runtime (selected for > runtime) > [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for > runtime) > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: > org.apache.maven:maven-plugin > -registry:jar:2.0 from the repository. > [DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0:runtime (selected > for runtime) > [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for > runtime) > [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for > runtime) > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-deploy-plugin:2.2.1:deploy-file' --> > [DEBUG] (f) file = /xenv/commons-digester/X/1.5/lib/commons-digester.jar > [DEBUG] (f) generatePom = true > [DEBUG] (s) localRepository = [local] -> file:///tmp/Hermesmvnrep > [DEBUG] (f) pomFile = > /tmp/commons-digester_1.5_20504/commons-digester-1.5.pom > [DEBUG] (f) repositoryId = nyhub1 > [DEBUG] (f) repositoryLayout = default > [DEBUG] (f) uniqueVersion = true > [DEBUG] (f) url = scp://nyhub1/xenv/scripts/Hermesmvnrep > [DEBUG] -- end configuration -- > [INFO] [deploy:deploy-file] > [DEBUG] not adding permissions to wagon connection > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Error deploying artifact: Authentication failed: Cannot connect. > Reason: reject HostKey: nyhub > 1 > [INFO] > ------------------------------------------------------------------------ > [DEBUG] Trace > org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying > artifact: Authentication fail > ed: Cannot connect. Reason: reject HostKey: nyhub1 > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor. > java:559) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycle > Executor.java:488) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.j > ava:458) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLi > fecycleExecutor.java:306) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleEx > ecutor.java:219) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java: > 140) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) > 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:324) > 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.plugin.MojoExecutionException: Error deploying > artifact: Authentication f > ailed: Cannot connect. Reason: reject HostKey: nyhub1 > at > org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:240) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor. > java:534) > ... 16 more > Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: > Error deploying artifact: > Authentication failed: Cannot connect. Reason: reject HostKey: nyhub1 > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer. > java:91) > at > org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:236) > ... 18 more > Caused by: org.apache.maven.wagon.TransferFailedException: Authentication > failed: Cannot connect. Rea > son: reject HostKey: nyhub1 > at > org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.ja > va:211) > at > org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java > :109) > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer. > java:77) > ... 19 more > Caused by: org.apache.maven.wagon.authentication.AuthenticationException: > Cannot connect. Reason: rej > ect HostKey: nyhub1 > at > org.apache.maven.wagon.providers.ssh.AbstractSshWagon.openConnection(AbstractSshWagon.java > :239) > at > org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143) > at > org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.ja > va:178) > ... 21 more > Caused by: com.jcraft.jsch.JSchException: reject HostKey: nyhub1 > at com.jcraft.jsch.Session.checkHost(Unknown Source) > at com.jcraft.jsch.Session.connect(Unknown Source) > at com.jcraft.jsch.Session.connect(Unknown Source) > at > org.apache.maven.wagon.providers.ssh.AbstractSshWagon.openConnection(AbstractSshWagon.java > :228) > ... 23 more > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 3 seconds > [INFO] Finished at: Wed Oct 18 14:53:11 EDT 2006 > [INFO] Final Memory: 2M/6M > [INFO] > ------------------------------------------------------------------------ > Any quick helpwill be greatly appreciated -- 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