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

Bug 311119

Summary: Unable to fetch from remote repository over SSH
Product: [Technology] EGit Reporter: Martin Polden <martin.polden>
Component: CoreAssignee: Mathias Kinzler <mathias.kinzler>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jens.baumgart, koppaz, lxbiao1122, maarten, schweiger1984, skyred, stefan.lay, yohannlepage
Version: 0.7.1   
Target Milestone: 1.0.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Martin Polden CLA 2010-04-29 17:26:32 EDT
Fetching from remote repository over SSH does not seem to be working on Ubuntu 10.04 LTS.

I installed the 'eclipse' package from universe. This happened with a fresh configuration directory and no other plugins installed beside EGit.

Steps to reproduce:
1. Create empty project
2. Right click project -> Team -> Share Project -> Create Git repository
3. Right click project -> Team -> Fetch from... -> URI: git+ssh://username@host/path/to/git/repo
4. When clicking next I get the following error:
Cannot get remote repository refs.
Reason: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "com/jcraft/jsch/JSch"
5. If I retry step 4 without restarting Eclispe I get the following error:
Cannot get remote repository refs.
Reason: com/jcraft/jsch/Session

I've checked that the libjsch-java is installed and that the /usr/share/java/jsch.jar symlink exists.
Comment 1 Andy CLA 2010-05-09 09:22:52 EDT
Yeah! I have the same bugs in my eclipse !
I also use Ubuntu 10.04...
Comment 2 Yohann Lepage CLA 2010-05-09 18:14:54 EDT
I have this bug with the same configuration (with github repo).
Comment 3 Stefan Schweiger CLA 2010-05-18 11:30:26 EDT
I have the same configuration here.

Ubuntu 10.04 LTS 64bit and Eclipse installed from Ubuntu repositories.

I also tried to use sun-java6-jdk instead of openjdk-6-jdk with no success. So I dont think this error depends on the jdk/ jre.

I hope this bug will be fixed soon.

kind regards
Nuki
Comment 4 Patrick Koppers CLA 2010-05-18 12:57:56 EDT
Same problem over here. But only on my Ubuntu 10.04 LTS 64 Bit. On my Fedora 12 64Bit I don't have this issue.
But I have found a workaround. Al least is seems to work.

Just delete your symlink "/usr/share/eclipse/plugins/com.jcraft.jsch_0.1.42.jar" or move it to another folder.

For those who don't know how to do this, just enter the following two commands into your terminal:
1: sudo mkdir /usr/share/eclipse/bkp
2: sudo mv /usr/share/eclipse/plugins/com.jcraft.jsch_0.1.42.jar /usr/share/eclipse/bkp/
Then (re-)start Eclipse.

This will create a new folder and move the above mentioned symlink to this folder. You will have to enter your login-password after the first command.

By doing so, I am now able to import git-projects per ssh. I can't guarantee that everything else will work. If you have any other problems with any other plugin, just copy the symlink back to the plugins-folder and restart. (Do this by execute the following command on a terminal: "sudo mv /usr/share/eclipse/bkp/com.jcraft.jsch_0.1.42.jar /usr/share/eclipse/plugins/").
Comment 5 Stefan Schweiger CLA 2010-05-18 14:07:53 EDT
Patricks Solution worked fine for me. But I want to note, that my com.jcraft.jsch_0.1.42.jar was located in "/usr/lib/eclipse/plugins".

kind regards
Nuki
Comment 6 Martin Polden CLA 2010-05-18 14:36:04 EDT
The bug seems to have been solved in the nightly builds. Using the nightly builds repository works fine in Ubuntu 10.04 LTS.
Comment 7 Jingsheng Wang CLA 2010-05-19 16:13:57 EDT
Same problem.

Same configuration as #comment 3
Comment 8 Jens Baumgart CLA 2011-06-28 07:44:56 EDT
I assume the problem no longer occurs. Please reopen this message if the problem reappears.