summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2017-11-07 08:19:56 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2017-11-10 10:16:58 +0100
commitf67af4e16b3adc0d2c14fa5e2fdc594975e7fe40 (patch)
treec180071ec62f2b74a7654e0fac7e4adeff94bb01 /org.eclipse.jgit.pgm/src
parent031646963fc8d0b9d2a87dca3ea2d05151f55441 (diff)
downloadjgit-f67af4e16b3adc0d2c14fa5e2fdc594975e7fe40.tar.gz
jgit-f67af4e16b3adc0d2c14fa5e2fdc594975e7fe40.zip
Work around a Jsch bug: ensure the user name is set from URI
JSch unconditionally overrides the user name given in the connection URI by the one found in ~/.ssh/config (if that does specify one for the used host). If the SSH config file has a different user name, we'll end up using the wrong name, which typically results in an authentication failure or in Eclipse/EGit asking for a password for the wrong user. Unfortunately there is no way to prevent or circumvent this Jsch behavior up front; it occurs already in the Session constructor at com.jcraft.jsch.Session() and the Session.applyConfig() method. And while there is a Session.setUserName() that would enable us to correct this, that latter method has package visibility only. So resort to reflection to invoke that setUserName() method to ensure that Jsch uses the user name from the URI, if there is one. Bug: 526778 Change-Id: Ia327099b5210a037380b2750a7fd76ff25c41a5a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
0 files changed, 0 insertions, 0 deletions