Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2011-05-31 20:21:27 +0000
committerCode Review2011-05-31 20:21:27 +0000
commit75b7edd253a9a205585754cb8c2d795af5d37f7e (patch)
tree0322be67e0553c2ca557af0b04377723c5457629
parent37415d835d24abd1ba302951691d5076d1af89d2 (diff)
parent7bf48410a1296afcaf1747019bdfc6322d053996 (diff)
downloadegit-75b7edd253a9a205585754cb8c2d795af5d37f7e.tar.gz
egit-75b7edd253a9a205585754cb8c2d795af5d37f7e.tar.xz
egit-75b7edd253a9a205585754cb8c2d795af5d37f7e.zip
Merge "Show password prompt when UserInfo doesn't have password" into stable-1.0
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/EclipseSshSessionFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/EclipseSshSessionFactory.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/EclipseSshSessionFactory.java
index a33c8de4c..cdc3c4669 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/EclipseSshSessionFactory.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/EclipseSshSessionFactory.java
@@ -19,6 +19,7 @@ import org.eclipse.jsch.ui.UserInfoPrompter;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
class EclipseSshSessionFactory extends JschConfigSessionFactory {
private final IJSchService provider;
@@ -57,8 +58,9 @@ class EclipseSshSessionFactory extends JschConfigSessionFactory {
@Override
protected void configure(final OpenSshConfig.Host hc, final Session session) {
- if (!hc.isBatchMode() && session.getUserInfo() == null) {
+ UserInfo userInfo = session.getUserInfo();
+ if (!hc.isBatchMode()
+ && (userInfo == null || userInfo.getPassword() == null))
new UserInfoPrompter(session);
- }
}
}

Back to the top