Yesterday I setup EGit and PuTTY so I can share my latest changes to the code to my RPi which then packs my binary into a executable jar, and with quiet alot of extra work, I got it working to some extent, I could successfully push my local resipotory to github, and my RPi could fetch the latest commit if needed. But I still had some minor problems with my RPi executing my code and compiling etc.
However, today everything suddenly stopped working, I could no more push my local resipotory to github for whatever reason and I have just not been able to figure it out (the funny thing about ALL this is that I thought it would be very beneficial if my RPi could stay up to date with my latest code so I wouldn't have to manually export my code to the RPi by remote desktop and dropbox, but it turned out to be even more complicated than I thought it was).
The most annoying thing is that it was working just fine yesterday, I did change a few things in my project within eclipse but other than that, everything should've been the same. Basically EGit first told me that the server host key was not cached. And I resolved that by calling plink git#github.com from the command line. After that I was left with another problem: PuTTY Fatal Error: Disconnected: No supported authentication methods available, and after Googleing the problem for a good hour or so, I found out that Pageant had apparently no private key in the Pageant key list. So I had to convert the id_dsa private key generated by eclipse to a PuTTY Private Key File, which resolved that issue, after launching EGit again, I first thought it would work, but oh no! I've never been so wrong in all my life. I tried to push my local resipotory to github, but it got stuck at getting remote branches information, so I tried to cancel it. But it didn't work, I couldn't close the wizard due the process had to be cancelled first. So I had to manually TERMINATE the plink.exe process to close the wizard.
I would be so thankful if anyone could help me out here. Thanks in advance!
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'm having a hard time using eclipse because of the following issue.
It goes like this. I'll code and try to run it. Then, it will throw some errors (of any kind). And so, after I have changed a part of the code, comment out which codes I suspect makes the error, or delete something, I then restart the websphere application server in order to republish my work. Next is to test my work using SoapUI then all of a sudden eclipse throws an error which is the same as before. I've tried to search in here answers to this questions but it involves codes which don't need in my project and also answers that I can't understand well (since I am very new to programming). However, I have found a way to resolve this but it's very inconvenient. To be able for eclipse to detect changes in the src folder, I should restart eclipse after editing my codes then remove my project in the server, start the server and then publish my work in websphere all over again. It solves my problem but I do all of these stuff every now and then even if I only comment out a single line in the code. What I want is to avoid doing this process of resolving the issue since it consumes so much of my time whenever I republish the project in the server.
Can somebody help me with this? Any suggestions would be very helpful. Thanks a lot!
It is a bit strange that you need to restart eclipse. The normal way would be to just re run your application server.
Try only he 3 second steps you mentioned (remove my project in the server, start the server and then publish my work in websphere) and if that works try again without removing the project. Just restart the servers.
And let us know if that worked!
Running the Mars version of Eclipse on Windows 10. I'm trying to clone a repository with this URL (domain name replaced with example.com):
ssh://git#git.example.com/opt/git/dnsconfig.git
Initially I had a lot of trouble trying to connect, because Eclipse did not have the server fingerprint in known_hosts, and had no way to accept the unknown fingerprint. I eventually figured out a way around that (copy the line from a Linux server's known_hosts file to the eclipse known_hosts on Windows). The public key matching the private key in eclipse has been added to the authorized_keys file on the server.
Now that I have solved the fingerprint problem, when I try the clone, I get to the Branch Selection screen and this is the error message at the top:
ssh://git#git.example.com/opt/git/dnsconfig.git: not found.:
ssh://git#git.example.com/opt/git/dnsconfig.git: not found.
If I go to a Linux machine and type the following command (this host is also set up with an ssh key in authorized_keys on the server), it works perfectly:
git clone ssh://git#git.example.com/opt/git/dnsconfig.git
I set up the server using this as a guide:
https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
This is probably user error ... can anyone help me figure out what I've done wrong?
After I tried msysgit, the note from MichaĆ Grzejszcza talking about Putty led me to try one more thing.
I do use putty quite frequently, and I have a key that I keep loaded in pageant, which I use to log into personal accounts on several servers.
I was not using that personal key for eclipse, I wanted to use a completely separate key for git.
When I added the matching public key for my personal key to the git user's authorized_keys file on the git server, suddenly both eclipse and msysgit were working fine, which means that both of them are tied into putty. This was a little surprising for msysgit, since the info I have on msysgit says that it comes with and uses openssh.
I'm using W7 64 bi , and just got an error from the github client app. It says:
failed to sync branch. you might need to open a shell and debug the state of this repo.
What do I do now ?
I know this will sound crazy, but try restarting your computer.
This happend to me yesterday; I was getting this error, and upon checking: \AppData\Local\GitHub\TheLog.txt
I found messages like:
AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\bin\sh.exe:
*** Couldn't reserve space for cygwin's heap, Win32 error 0
The problem comes around to GitHub for Windows updating itself (in particular the cygwin-ized PortableGit) in the background while I was using it. Ultimately, some cygwin dlls from the previous PortableGit dlls were still loaded in memory causing errors when trying to execute the new (updated) PortableGit commands.
Restarting cleared out all the previously loaded cygwin dlls.
You might have a more complex problem than my answer can solve, but -- for anyone else who comes across this question -- some basic solutions can be found in this video. In short, status.github.com, git status, and gitstatus are your friends. See what they tell you and then continue your sleuthing with that new information in mind. You can use these tools using Git Shell that comes with the Github Windows client.
I'll note that my own problem stemmed from trying to sync a file that was too large: I only found this by using the Git Shell, which gave me the error when I tried git sync. I'm currently looking for ways to remove the file in question in previous commits so I can sync my repo appropriately. The guide I am currently following can be found here, and if it seems to be taking me in the right direction (it was actually recommended in the Git Shell error message!)
I had this error before, and I fixed it by reinserting the credentials for my github account. Turns out that github logged me out for some reason
I installed the Egit plugin for Eclipse on both of my Mac OSX and Windows. However they all have problem, but it seems Mac OSX is more serious when it comes to auth the key.
when i push the project to repository using the Team - Remote - Push, I tried many versions of the URL on the website, but all failed. I remembered it succeed once on Windows.
as another question "http://stackoverflow.com/questions/3601805/auth-problem-with-egit-and-github", i tried to load the private key to Eclipse, on Windows, after I clicked Load Existing Key, it prompt let me to enter pass, after that it works.
But i did the same way on Mac OSX, it doesn't work and it shows "failed to decrypt id_rsa". I don't know why. Because i used the same pass through ssh it works. How come???
after i create the repository and used ssh to connect and it works. Then i changed some files on Eclipse and commit, then Remote - Push, it prompt let me enter the pass, but still doesn't work on Mac OSX.(It works on Windows)
I am wondering who has experienced this kind of problems before? I just did that for fun, I don't use it for work. Anyone can tell me how do you fix that for work? using egit or ssh?
Thanks
I'm not clear on your question. Are you asking "How do I use ssh-key based authentication to authenticate my git connections through EGit?" The question you link to - "Auth Failed" error with EGit and GitHub - seems to address a lot of problems you might have been having.
Eclipse needs to have the correct connection information. [Preferences => General => Network Connections => SSH2]. If this is correct, EGit should be able to use key-based authentication as answered here - Can EGit (Eclipse git plugin) use an SSH key instead of a username and password?.
Also, if you haven't already found it, there is a pretty good user guide for EGit at http://wiki.eclipse.org/EGit/User_Guide.
Successfully solved issue:
It appears that the SSH key lengths are different when generated on the command line in OSX and when generated from Eclipse/EGit.
Similar posting here: Eclipse Community Forums
Observed that SSH keys generated from command line are 2048 in length, keys generated from within Eclipse/EGit are only 1024 in length.
Verify using: "ssh-keygen -t rsa -C "your_email#youremail.com" Key length is 2048
When Attempting to load an existing key from within "Preferences->General->NetworkConnections->SSH2" this fails with "failed to decrypt id_rsa"
When Generating a key from the same dialog; keylength is specified as RSA-1024
After following the directions at the link above, I got everything working again. Note that the listing within Eclipse still shows length of 1024, but length of key reported by "ssh-add -l" still at 2048, same length as it was originally configured.