Honor ~/.ssh/config whenever possible during SSH based transport
I rely on ~/.ssh/config to setup host aliases, especially for very
common destinations. For example I have the following on most of
my systems:
Host orcz
HostName repo.or.cz
User spearce
IdentityFile .ssh/id_orcz
as not every system I use has my local user name as "spearce". The
C Git transport honors these settings just fine for short URLs like
"orcz:/srv/git/egit.git" but jgit failed horribly on these as there
is no local system named "orcz" on any of my networks.
By reading (and caching) the ~/.ssh/config file jgit can now honor
the important aspects of the host configuration blocks, allowing it
to use the same URLs as C Git.
The JSch API does not seem to allow forcing a specific key identity
for a Session so we are forced to load the identity file listed in
the configuration into the core JSch object we are running with.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>