diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-01-12 12:51:22 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-01-12 12:56:00 +0100 |
commit | bea3b46678c0b53ed7212a1190c4a8bb8b9002a4 (patch) | |
tree | e2aae2075c7f0b11408b2c1b717fa2cd0306e424 /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java | |
parent | 279eaf069004b8dca523f1ecb231c1df02ac9031 (diff) | |
download | jgit-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/org/eclipse/jgit/transport/OpenSshConfigTest.java')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java | 3 |
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 |