]> source.dussan.org Git - jgit.git/commit
Revert handling of ssh IdentityFile to pre-4.9 behavior 94/115294/1
authorThomas Wolf <thomas.wolf@paranor.ch>
Fri, 12 Jan 2018 11:51:22 +0000 (12:51 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Fri, 12 Jan 2018 11:56:00 +0000 (12:56 +0100)
commitbea3b46678c0b53ed7212a1190c4a8bb8b9002a4
treee2aae2075c7f0b11408b2c1b717fa2cd0306e424
parent279eaf069004b8dca523f1ecb231c1df02ac9031
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>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java