Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Suddenly getting "No more authentication methods available" with ssh auth to git repo
Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1800994] Thu, 10 January 2019 18:46 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
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.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801003 is a reply to message #1800994] Thu, 10 January 2019 21:47 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
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.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801006 is a reply to message #1801003] Fri, 11 January 2019 01:35 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1274
Registered: July 2009
Senior Member
Are there any related errors logged in the Eclipse error log ?
Open the Eclipse error log view to check this.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801063 is a reply to message #1801006] Fri, 11 January 2019 19:27 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
I'm not sure I understand what you're asking. I already posted the "related" exception from the log
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801372 is a reply to message #1801063] Thu, 17 January 2019 19:34 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
We'd need more info. Where's your home directory? Do have a SSH config file there (~/.ssh/config)? If so, what are the contents? What identities are configured? (See in the SSH2 preferences.) What authentication methods are enabled? (Also in the SSH2 preferences.) What is user.home inside Eclipse? (Check the Eclipse configuration in the "About" dialog.)

The stack trace is rather short. Isn't there anything more?
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801378 is a reply to message #1801372] Thu, 17 January 2019 22:09 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
Oh, heck. I'm now unable to repeat this. I set it back to Apache Mina, and now I don't get errors on pull. I even tried restarting Eclipse. Still succeeds. I changed it back to Jsch, and it still works. I don't know why this was happening.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1801779 is a reply to message #1801378] Sat, 26 January 2019 11:35 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
See also bug 543855. There was another similar report, and I've even seen this myself twice with a repo at bitbucket.org, but we cannot reproduce it. Might also be a server-side problem (but we don't know that!); so far we've only had reports about repos hosted on Bitbucket servers.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1805096 is a reply to message #1801003] Fri, 05 April 2019 22:36 Go to previous messageGo to next message
Doug Breaux is currently offline Doug BreauxFriend
Messages: 5
Registered: July 2009
Junior Member
But bless you, switching from Mina to Jsch resolved it for me here too.

(In my case, to IBM's GHE instance at github.ibm.com. Eclipse 2019-03)

Although... skimming that bug, maybe it's just the act of saving some kind of change to the settings that resolves it.

[Updated on: Fri, 05 April 2019 22:38]

Report message to a moderator

Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1805707 is a reply to message #1805096] Mon, 22 April 2019 11:32 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
We really need more information to get to the bottom of this. Please follow the steps to run jgit with debug logging and post the log or a relevant excerpt somewhere, for instance as attachment to a new bug report in bugzilla.

Also check the location of your SSH config file. JSch always uses ~/.ssh/config (i.e., inside the user's home directory), whereas Apache MINA uses the config file located in the directory specified as "SSH Home" in the Eclipse SSH2 preferences. If that points to somewhere else, Apache MINA might not find your config file, or find a different one.

Also note that the Apache MINA SSH client in EGit/JGit doesn't work with ssh-agent/Pageant (yet).
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1805710 is a reply to message #1805707] Mon, 22 April 2019 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Quote:
Also check the location of your SSH config file. JSch always uses ~/.ssh/config (i.e., inside the user's home directory), whereas Apache MINA uses the config file located in the directory specified as "SSH Home" in the Eclipse SSH2 preferences. If that points to somewhere else, Apache MINA might not find your config file, or find a different one.


Hmmm... I do have my Eclipse SSH Home set to something non-default. Although I don't actually have a config file in either location.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1806059 is a reply to message #1805710] Wed, 01 May 2019 21:40 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
It's also the directory where EGit will look for default identity files like id_rsa.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1806060 is a reply to message #1806059] Wed, 01 May 2019 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Yes, but I'm not using default key. I'm explicitly pointing Egit to a different file.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1806173 is a reply to message #1806060] Sat, 04 May 2019 21:19 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Sooo... if I understand this right, you have in Eclipse SSH2_HOME = x, where x != ~/.ssh. Then you have also in Eclipse "Private Keys" = id_something.

JSch will ignore "x". It'll try ~/.ssh/id_something, ~/.ssh/id_dsa, ~/.ssh/id_rsa.

Apache MINA will try x/id_something, x/id_rsa, x/id_dsa, x/id_ecdsa, x/id_ed25519.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1815521 is a reply to message #1806173] Fri, 04 October 2019 05:40 Go to previous messageGo to next message
Timothy Harper is currently offline Timothy HarperFriend
Messages: 1
Registered: October 2019
Junior Member
This will set the GIT_SSH environment variable to use the ssh client included with git.

The .profile script gets executed when you start your Git Bash command line dgcustomerfirst.

This is my .profile. It will ask you for your password the first time you start the git command prompt, then will remember it from then on, until you reboot your computer. Very handy so you don't have to keep entering your password each time you want to do something.

[Updated on: Sat, 05 October 2019 04:41]

Report message to a moderator

Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1848888 is a reply to message #1815521] Wed, 22 December 2021 10:55 Go to previous messageGo to next message
daniil Medved is currently offline daniil MedvedFriend
Messages: 1
Registered: December 2021
Junior Member
Timothy Harper wrote on Fri, 04 October 2019 05:40
This will set the GIT_SSH environment variable to use the ssh client included with git.

The .profile script gets executed when you start your Git Bash command line

This is my .profile. It will ask you for your password the first time you start the git command prompt, they will remember it from then on until you reboot your computer. Very handy so you don't have to keep entering your password each time you want to do something.


Thank you for your honest reply to us. I got a huge amount of knowledge from you guys. Looking for more threads here


dgcustomerfirst has the option to submit feedback about the dg store.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1854220 is a reply to message #1848888] Mon, 08 August 2022 11:02 Go to previous messageGo to next message
You Techo is currently offline You TechoFriend
Messages: 1
Registered: August 2022
Junior Member
check the location of your SSH config file. JSch always uses ~/.ssh/config (i.e., inside the user's home directory), whereas Apache MINA uses the config file located in the directory specified as "SSH Home" in the Eclipse SSH2 preferences. If that points to somewhere else, Apache MINA might not find your config file, or find a different one.
Re: Suddenly getting "No more authentication methods available" with ssh auth to git repo [message #1854237 is a reply to message #1854220] Mon, 08 August 2022 17:35 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Thanks for re-quoting my statement from above from April 22, 2019. It is still correct.
Previous Topic:JGIT LS Remote Repositor using SSH
Next Topic:Git Clone Wizard Very Slow Vs. Git Command Line
Goto Forum:
  


Current Time: Fri Nov 08 23:38:54 GMT 2024

Powered by FUDForum. Page generated in 0.04687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top