Author: maartenc
Date: Thu Feb 28 23:32:45 2013
New Revision: 1451436

URL: http://svn.apache.org/r1451436
Log:
FIX: Ssh Resolver doesn't work with Java 7 (IVY-1408) (thanks to Mykhailo 
Delegan)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1451436&r1=1451435&r2=1451436&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Feb 28 23:32:45 2013
@@ -40,6 +40,7 @@ for detailed view of each issue, please 
        Archie Cobbs
        Flavio Coutinho da Costa
        Stefan De Boey
+       Mykhailo Delegan
        Martin Eigenbrodt
        Stephen Evanchik
        Robin Fernandes
@@ -145,6 +146,7 @@ for detailed view of each issue, please 
 - IMPROVEMENT: add support for source bundles from p2 repositories
 - IMPROVEMENT: add support for source URI from OBR repositories
 
+- FIX: Ssh Resolver doesn't work with Java 7 (IVY-1408) (thanks to Mykhailo 
Delegan)
 - FIX: Parsing publication date in Ant tasks not thread-safe (IVY-1412)
 - FIX: NullPointerException when using httpclient and server doesn't return 
content-type header (IVY-1400) (thanks to Frederic Riviere)
 - FIX: Properly handle evicted nodes in ResolveReport

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java?rev=1451436&r1=1451435&r2=1451436&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java 
(original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java 
Thu Feb 28 23:32:45 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.event.IvyEvent;
@@ -328,6 +329,12 @@ public final class SshCache {
                 session.setUserInfo(new CfUserInfo(host, username, 
userPassword, pemFile,
                         pemPassword, passFile));
                 session.setDaemonThread(true);
+                
+                Properties config = new Properties();
+                config.setProperty("PreferredAuthentications",
+                        "publickey,keyboard-interactive,password");
+                session.setConfig(config);
+                
                 session.connect();
                 Message.verbose(":: SSH :: connected to " + host + "!");
                 setSession(username, host, port, session);


Reply via email to