[WORKAROUND] Cannot perform fetch/pull/push operations from Eclipse Egit


#1

Greetings,

yesterday I upgraded my GitLab Ubuntu server from version gitlab-ce-10.2.3 to gitlab-ce-10.3.3.
The upgrade went smoothly, but then I suddenly discovered that I was not able anymore to perform any remote operation from any of my Eclipse workspaces which point to my GitLab-hosted repositories: any fetch/pull operation (could not test push ones) would indefinitely remain at 0% progress.
All the connections from Eclipse or CLI are performed via SSH.
Please note that, suspecting some kind of bug in the Egit version used, I also upgraded Eclipse in between the first tests from Neon.2 to Oxygen.2 with no change in the outcome.
Running git fetch or git pull from the command line (using git 2.14.1 on Linux x64) works ok, however.
I then discovered that, if I restarted the GitLab server via gitlab-ctl restart while Eclipse was already stuck at 0% in a fetch/pull operation, then Eclipse would gladly complete the operation with no errors, also pulling in changes flawlessly(!).
I then successfully performed a downgrade to version 10.2.5 on the GitLab server following the documentation advice, then found that Eclipse was again working ok.
I was not sure if this could be an issue with Eclipse or GitLab, but I suspect that some change between version 10.2 and 10.3 of GitLab-CE broke something at least for some clients.

Does anybody have the same issue?


#2

Same problem here with Eclipse (update from 10.2.4 to 10.3.4): HTTPS works, SSH not.


#3

Glad I’m not the only one here with this kind of issue.
@thoren: is git working fine on the command line?


#4

Yes, git is working on the command line


#5

The problem is probably related to this:

Hangs when cloning/fetching from git server 2.14.3 with GIT_SSH set
https://bugs.eclipse.org/bugs/show_bug.cgi?id=529463

If I manually terminate the SSH/plink process on the client side while Eclipse hang, git pull works. It also works if the environment variable GIT_SSH is cleared and the OpenSSH key is stored directly in Eclipse.


#6

Great, that means we’ve got at least a workaround!
Thanks for the information, @thoren! :+1:


#7

I found another way to make Eclipse work again correctly without using the GIT_SSH environment variable override that is causing the issue on recent git versions.
If you where using that variable override only to make use of an agent for ssh keys available at system-level (ssh-agent or pagent) in Eclipse, then you can try using the SSH Agent integration for Eclipse plugin available on the Eclipse marketplace.
Make sure, upon installing it, to remove any private keys configured from the Eclipse SSH preferences and to enable the ssh-agent checkbox in the relevant tab (also in SSH preferences).


#8

Installing the SSH agent integration for Eclipse doesn’t work for me… Eclipse is a real pain in the *** when it comes to using Git. It just hangs forever, without giving any kind of feedback. I’ve been having troubles with Git & Eclipse for years now, it’s really a shame the teams behind Eclipse & EGit are not able to deliver something stable.


#9

Did you make sure to remove any private keys set in the preferences?
I also had your problem until I removed them.


#10

Yes I did, as mentioned in https://eclipseguru.github.io/eclipse-jsch-agent-proxy/.


#11

Removing the GIT_SSH environment variable allowed me to use Git in Eclipse, but now I’m not able to use Git in VS code :-/

To summarize, either I can work with Eclipse but no other IDE, or I can work with any IDE but not Eclipse.


#12

Sorry, I assumed you already removed that variable from the environment. It is a requirement for using the ssh-agent option from Eclipse.

I find it strange that git in VS code is not working for you after removing that variable: I’m using it without any problems whatsoever… Are you using any additional git extension in vscode?