aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2018-01-12 12:51:22 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2018-01-12 12:56:00 +0100
commitbea3b46678c0b53ed7212a1190c4a8bb8b9002a4 (patch)
treee2aae2075c7f0b11408b2c1b717fa2cd0306e424 /org.eclipse.jgit.test/tst
parent279eaf069004b8dca523f1ecb231c1df02ac9031 (diff)
downloadjgit-bea3b46678c0b53ed7212a1190c4a8bb8b9002a4.tar.gz
jgit-bea3b46678c0b53ed7212a1190c4a8bb8b9002a4.zip
Revert handling of ssh IdentityFile to pre-4.9 behavior
Jsch caches keys (aka identities) specified in ~/.ssh/config via IndentityFile only for the current Jsch Session. This results in multiple password prompts for successive sessions. Do the handling of IdentityFile exclusively in JGit, as it was before 4.9. JGit uses different Jsch instances per host and caches the IdentityFile there, allowing it to be re-used in different sessions for the same host. * Add comments to explain this. * Move the JschBugFixingConfig from OpenSshConfig to JschConfigSessionFactory to have all these Jsch work-arounds in one place. * Make that config hide the IdentityFile config from Jsch to avoid that Jsch overrides the JGit behavior. Bug: 529173 Change-Id: Ib36c34a2921ba736adeb64de71323c2b91151613 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
index 8ce3f0f147..d604751fef 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
@@ -343,7 +343,8 @@ public class OpenSshConfigTest extends RepositoryTestCase {
assertEquals(h1.getConnectionAttempts(), h2.getConnectionAttempts());
final ConfigRepository.Config c = osc.getConfig("orcz");
assertNotNull(c);
- assertSame(h1.getConfig(), h2.getConfig());
+ assertSame(c, h1.getConfig());
+ assertSame(c, h2.getConfig());
}
@Test