Bug 335897 - egit doesn't understand host aliases from /etc/ssh/ssh_config
Summary: egit doesn't understand host aliases from /etc/ssh/ssh_config
Status: ASSIGNED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Philipp Thun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 15:30 EST by Sergey Ilinykh CLA
Modified: 2011-12-09 12:13 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Ilinykh CLA 2011-01-31 15:30:14 EST
I have alias in ssh config like

Host mygithost
   Hostname real.host.name
   Port 4321

when i'm trying to specify git uri something like
ssh://git@mygithost:myrepo.git

it says that mygithost is unknown host, but this works fine with native git command line.
Comment 1 Philipp Thun CLA 2011-02-28 11:53:28 EST
I have tried this and it worked for me...

First, I have create a "config" file with the following content:
---
Host eclipse
	Hostname egit.eclipse.org
	Port 29418
---

In Eclipse, I have ensured that the "SSH2 home" is set to the correct directory (where I put the config file).

I have then clicked on "Clone a Git Repository..." from within the "Git Repositories" view in Eclipse and entered the following URI: ssh://<my_user>@eclipse/jgit.git

Clicking "Next" and "Finish" cloned JGit to my local machine.

Could you please check your SSH2 and proxy preferences in Eclipse?
Comment 2 Sergey Ilinykh CLA 2011-02-28 12:25:50 EST
its set to /home/mylogin/.ssh

does this mean eclipse/egit uses either user specific config or global one but never both?
Comment 3 luc CLA 2011-04-06 08:47:41 EDT
I experienced the same problem.
I had to duplicate the entry in my ~/.ssh/config file, something like:

Host www.example.domain
  Hostname www.example.domain
  ProxyCommand ...
  ...

Host forge
  Hostname www.example.domain
  Proxycommand ...
  ...

This is really inconvenient
Comment 4 Philipp Thun CLA 2011-12-09 11:58:05 EST
Uploaded a proposal to Gerrit: http://egit.eclipse.org/r/4775
Comment 5 Andrew Gvozdev CLA 2011-12-09 12:13:47 EST
Any chance it could be pulling aliases from Cygwin on Windows?