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


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?

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

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

Yes, git is working on the command line

The problem is probably related to this:

Hangs when cloning/fetching from git server 2.14.3 with GIT_SSH set

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.

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

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).

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.

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

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

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.

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?