I can use git fine from command line, I can use fine git from NetBeans IDE, and I can use git fine from IntelliJ IDEA.
But I cannot use git in any instance of Eclipse (either pure Eclipse for Java IDE, or IBM Rational Application Developer which based on Eclipse). SSH keys configured same as for other IDEs and are valid.
I suspect problem at some OS level, maybe Eclipse stores some global settings somewhere and all instance reuse them. Tried to delete %USERPROFILE%/.eclipse -- did not help.
The error in .log is like that (again, keys are valid and properly configured in SSH2 Preferences dialog in Eclipse):
!ENTRY org.eclipse.egit.ui 4 0 2019-03-29 13:01:45.024
!MESSAGE git#git.assembla.com:xxx.git: git#git.assembla.com: Permission denied (publickey,keyboard-interactive).
!STACK 0
org.eclipse.jgit.api.errors.TransportException: git#git.assembla.com:xxx.git: git#git.assembla.com: Permission denied (publickey,keyboard-interactive).
[UPDATED on 04/02/19]
as you can see github.com was not even added to known hosts, i.e. it was not attempted to connect.
typical error.
command line git works
adding user id git to ssh protocol connection type does not help.
Ok, playing with Visual Studio Code I stumbled on the same problem and was able to fix it, so I tried to apply solution to Eclipe and it started working for me.
Not sure why the original problem started, but now I found at least a workaround and can use Git from the Eclipse.
To remind what I had in Eclipse:
org.eclipse.core.runtime.CoreException: Invalid remote: origin
at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:106)
at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.runInWorkspace(FetchOperationUI.java:123)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:134)
at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:103)
... 3 more
Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: git XXXXXXXXXXXXXXXXXXX: Permission denied (publickey).
at org.eclipse.jgit.transport.TransportGitSsh.cleanNotFound(TransportGitSsh.java:208)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.(TransportGitSsh.java:288)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
The solution was to start SSH agent first (to avoid asking passphrase) and then in the same shell session start Eclipse. Without any changes in Eclipse error gone and IDE started reaching repository.
So, the steps would be:
Open shell session (cmd.exe)
Start SSH agent (start-ssh-agent.cmd)
[In the same shell session] Start Eclipse (eclipse.exe)
Related
I've had Eclipse installed for quite a while. I upgraded to 2018-12 a few weeks ago. I've had ssh authentication set up for all my git repos (centrally stored in BitBucket Server) for a long time. It's been working perfectly fine.
Today I had to reboot my Windows7 laptop for some automated installations, which happens a few times a month.
I restarted Eclipse and suddenly I'm finding that all of my git repos are failing authentication. I'm seeing this in the log:
!MESSAGE ssh://git#.../....git: No more authentication methods available
!STACK 0
org.eclipse.jgit.api.errors.TransportException: ssh://git#.../.....git: No more authentication methods available
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:290)
at org.eclipse.egit.core.op.PullOperation$PullJob.run(PullOperation.java:256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git#.../.....git: No more authentication methods available
at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:249)
I then went to one of my local repositories in my Cygwin shell and tried a "git pull". This worked perfectly fine.
The only recent change I made that might be related to this is that I installed the Windows version of git, in addition to the Cygwin git. I put it at the end of the PATH. I don't see how that could be affecting this, as Eclipse is using jgit.
Update:
I think I just solved the problem, but I'm not sure what the real problem was.
When I installed 2018-12 a few weeks ago, I thought I noticed a mention of upcoming changes to what the default ssh client would be. I noticed that I was currently set to use JSch, and I thought the release notes said that it would be moving to "Apache MINA", so I decided to change it now and see how it worked. This was working fine for a couple of weeks.
Just now I tried changing that field back to "JSch" and then doing a pull. It worked fine. Just to be sure, I changed it back to "Apache MINA" and tried it again. Still failed. Changed it back to "JSch" and it's working.
I don't know what's going on here.
This is happened to me today... I don't have any clue why it's happening.. I tried removing eclipse and installed again... same problem again... I checked all the settings and everything seemed fine... the error message was not something to guess easily...
What i have done
My ssh keys are not the default one... I have a folders called github, internal and deployed inside ~/.ssh
So, In eclipse I went to Window > Prefrences -> Network -> SSH2 in private keys I have given the path to my keys... but i didn't change SSH2 home directory... this is the culprit.. I will tell you later why
SSH2 Home directory = ~/.ssh
path to private key = ~/.ssh/github/slokesh
I changed ssh client in Preferences -> Team -> git but every single time the same error was showing up...
So, then I went back to step 2, then there I changed SSH2 home directory to ~/.ssh/github and the path to private key to slokesh then it worked...
I hope this helps... if anything is unclear please leave a comment...
I feel that the error message they are throwing could be more verbose and clear. Also, there should be a note in the SSH2 home and private key path fields because the private key path they are taking as relative to SSH2 home. But unfortunately they are not giving...
I got update notification from Sprint Tool Suite or STS. I updated the packages as it asked for and did not pay attention to what exactly got updated. After the update, remote git operations i.e. push/pull are failing with following error. Git integration was working fine before the update and git commands do work properly from command line. STS still shows repository name and does recognize that project is connected to git
Can't connect to any repository: user#server:repository
(user#server:repository: connection failed)
I see following error getting logged in .log file of the workspace
org.eclipse.jgit.api.errors.TransportException:
user#server:repository: connection failed at
org.eclipse.jgit.api.PushCommand.call(PushCommand.java:180) at
org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:215) at
org.eclipse.egit.ui.internal.push.PushJob.performJob(PushJob.java:84)
at
org.eclipse.egit.ui.internal.jobs.RepositoryJob.run(RepositoryJob.java:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused
by: org.eclipse.jgit.errors.TransportException:
user#server:repository: connection failed at
org.eclipse.jgit.transport.JschSession$JschProcess.(JschSession.java:156)
at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:92)
at
org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.(TransportGitSsh.java:332)
at
org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:174)
at
org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1310) at
org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169) ... 4
more
Spring Tool Suite
Version: 3.9.1.RELEASE
Build Id: 201710111144
Platform: Eclipse Neon.3 (4.6.3)
I have a similar problem since the updates, but running on Eclipse Oxygen 1a.
I've created an issue with Spring Ide.
https://github.com/spring-projects/spring-ide/issues/210
I tried to set up a ssh connection in order to be able to pull git repositories with EGit in Eclipse via ssh. (I'm using Eclipse Luna).
For this I used instructions given on the Eclipse Wiki.
I went to Eclipse --> Windows --> Preferences --> General --> Network Connection --> SSH2 --> Key Management --> Generate RSA Key
and tried to export the key via the "Export via SFTP" Button. I entered
githubID#git.eclipse.org but instead of exporting my key, an error appeared on top of the window ("failed to export ssh key to remote server")
I did the whole process a few month ago (that worked) and only wanted to redo this, because pulling my repository caused an error.
Old pull Error:
ssh://githubID#git.eclipse.org/gitroot/myproject.git: Session.connect: java.io.IOException: End of IO Stream Read
I have read about an update of EGit and updated it as well as trying the whole process on a new laptop, but the error also occurs in the new laptop with a new Eclipse.
Does anybody knows a solution for my problem? Thank you in advance!
Finally I ended up asking the Eclipse Webmaster for help.
As my IP address hasn't been blocked (This might have been a solution!) I tried to use the Git Bash instead of EGit and that's worked! So it wasn't a problem with my ssh key, but with the Client, which seems to be broken.
It's more work to do all git commands manually, but finally it works.
It seems to be a bug in older versions of eGit.
Related: https://www.eclipse.org/forums/index.php/t/1096174/
However, the most recent versions of eGit are not compatible with Eclipse Luna any more.
For me, upgrading eGit to version 5.0.3, the last version compatible with Eclipse Luna by manually downloading eGit from here http://archive.eclipse.org/egit/updates-5.0.3/ and installing it from local solved the problem.
I've been using for the last 6 years JCraft's SFTP plugin.
It's quite simple to use and the only problem i ever had with it is that it doesn't know how to delete recursivly files and folders (it tries to delete folders before files).
Today i tried to update eclipse to Luna and I can't seem to install this plugin anymore.
I get the following error:
An error occurred while installing the items
session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.jcraft.eclipse.team.sftp 0.0.4, action=).
Failed to prepare partial IU: [R]com.jcraft.eclipse.team.sftp 0.0.4.
Any ideas on how to solve this ?
Thanks
From the error message "Failed to prepare partial IU" I found this thread: https://code.google.com/p/veloeclipse/issues/detail?id=47
The suggested workaround is to install the "Eclipse 2.0 Style Plugin Support", which adds support for "running old Eclipse plugins that are not proper OSGi bundles."
You can use Remote System Explorer (RSE) to replace the sftp plugin. It has sftp capabilities (use ssh connection) and allows you to synchronize files between local and server storage
I too struggled to get JCraft installed and then I discovered that Remote System Explorer (RSE) comes already installed in Eclipse Luna in the Java EE version but it may be baked into other versions of Eclipse as well. All I had to do was navigate to Window > Open Perspective > Other... > Remote System Explorer.
Once in the Remote Systems perspective, you will see links to your local files. To create a SSH connection to a remote server (even if it is in the same location as you but requires SSH protocol), just right-click anywhere in that Remote Systems tab and choose New > Connection and then under the General folder, select SSH Only. Fill out the host name or IP address.
If successful, the server will appear as a folder under the Local one. Attempt to navigate below the server's 'SFTP Files' folder and you will be prompted for your user ID and password on that remote server. Say yes to the prompt about trusting the certificate and you are good to go. Your remote files will appear in the file explorer type of GUI in that Remote Systems perspective.
Switch back to your regular local environment in any other perspective in the upper right corner of the Eclipse window just as you normally would.
I'm following the instructions for installing Ardor3D as an Eclipse Project Set via Subclipse; instructions at:
http://www.ardor3d.com/wiki/svneclipsetutorial
I installed Subclipse from
http://subclipse.tigris.org/
and installed fine. If I go to Eclipse's Preferences and Team|SVN I can see that the SVN Interface Client is JavaHL, and hence installed fine.
However, when I come to checkout the code at:
http://ardorlabs.svn.cvsdude.com/Ardor3Dv1
by selecting New|Other|SVN|Check Projects from SVN I get the following error message:
RA layer request failed
svn: Unable to connect to a repository at URL 'http://ardorlabs.svn.cvsdude.com/Ardor3Dv1'
svn: OPTIONS of 'http://ardorlabs.svn.cvsdude.com/Ardor3Dv1': could not connect to server (http://ardorlabs.svn.cvsdude.com)
I know the URL is valid as I can install the above fine on my work m/c of WinXP. However, the same installation on my personal laptop of Win7 fails to connect.
I tried temporarily disabling the firewall and it still fails.
I've tried playing around with the config and server files in:
C:\Documents and Settings\Administrator\Application Data\Subversion
but to be honest not 100% sure as what to change, if anything as I'm not using proxy settings.
If there's an expert out there who's knows the solution to this problem I would greatly appreciate hearing from you.
Thanks
Graham
PS. I find the error message "RA layer request failed" confusing as the URL is valid.
I had exactly the same problem, which turned out to be caused by a proxy server. The solution to my problem was to configure subversion to work with the proxy server, however it was not obvious how to do this.
You should have a directory similar to : C:\Documents and Settings\UserName\Application Data\Subversion
In that directory there will be a file called servers.
I un-commented and edited the following entries and my subversion is now working fine with Eclipse:
http-proxy-host
http-proxy-port
http-proxy-username
http-proxy-password
Why exactly you can't configure this through Eclipse is abit of a mystery, but there you go.
Another user account could login, I got the error as described above. The difference was the Proxy setting which was missing in my account. It is stored per user in the Registry and I could easily change this in the Tortoise SVN config.
We encountered this error with our server. While we were able to successfully access the CollabNet 5 SVN admin console, navigating to the repository to browse it from the admin console would fail. We also were not able to connect from Subclipse clients.
The problem turned out we were not hitting the correct port on the server. We had reconfigured the default port from 80 to 4343 and the admin console reported the changed setting but the server was still running on 80.
For what it's worth, in order for the configuration change to stick, we had to bring the repo server down and make the change in the admin console and then restart the machine. We were then able to browse the repo from the link in the admin console.