Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 406560

Summary: Cloning fails if SSH port is not default 22
Product: [ECD] Orion Reporter: Michael Ochmann <michael.ochmann>
Component: GitAssignee: Matthias Sohn <matthias.sohn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, mamacdon, matthias.sohn
Version: 3.0   
Target Milestone: 3.0 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Ochmann CLA 2013-04-25 10:04:35 EDT
Trying to clone a git repository from a Gerrit server with SSH fails if Gerrit server is running on the default port 29418. Symptom in the UI is that the Git credentials dialog keeps popping up although the entered credentials are definitly valid and cloning from a git shell works fine. Clonig a repository with the default SSH port 22 works without problem.
Comment 1 Michael Ochmann CLA 2013-04-25 10:04:53 EDT
I debugged the server-side Git adapter and finally found that the SSH port that is passed to org.eclipse.orion.server.jsch.SessionHandler is simply ignored in the constructor when creating the JSch session, i.e. line 40 should read 

this.session = jSch.getSession(user, host, port);

instead of 

this.session = jSch.getSession(user, host);