David M. Karr
David M. Karr

Reputation: 15205

Suddenly getting "No more authentication methods available" from eclipse egit from formerly working installation

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.

Upvotes: 5

Views: 15880

Answers (1)

Lokesh Sanapalli
Lokesh Sanapalli

Reputation: 1034

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

Upvotes: 6

Related Questions