I\'ve installed EGit plugin at Eclipse Helios and I\'m trying to use it with my GitHub account, but when I try to configure it I get an \"Auth Failed\" error.
I\'d b
For existing ssh keys, I think that it's a bug in Eclipse Juno 3.8.
What I did:
1) Load the existing key by going to: Window > Preferences > "Search ssh" > Key Management Tab > Load Existing Key > Select the private key which you already have
2) Save that key by clicking the button Save Private Key. Let's name it id_dsa_github
3) Now check if push and pull are working or not. It should be.
4) Now in the general tab, remove the private key id_dsa_github and add your previous private key by clicking the button Add private key
Now you are good to go. It's taking at least one time to do all the things from EGit to register, I guess.
You need to install msysgit, after installing you need to open Git Bash and enter there these commands:
$ git config --global user.name "Gennadiy Zlobin" (your name)
$ git config --global user.email gennad.zlobin@gmail.com (your email)
$ ssh-keygen -C "gennad.zlobin@gmail.com" -t rsa (your email)
Now your generated keys are in C:\Users\username\.ssh
(in Windows 7).
Next you load the content of your public key to your project on Github
In Eclipse open Window->Preferences->General->Network->SSH2
and set your ~/.ssh
as SSH Home
After that go to Key Management tab
and Load existing Key - set here your private key in ~/.ssh
.
After that you can push your project to Github (but I set ssh protocol, not git+ssh).
My answer may be outdated but hopefully it can be useful for someone.
In your Eclipse go to Window > Preferences > General > Network Connections > SSH2 (or just type "SSH2" in preferences window filter box).
In "Key Management" tab press "Generate RSA Key..." button. Optionally you can add comment (usually e-mail address) and passphrase to your key. Passphrase will be used during authentication on GitHub.
That's it! Now you should be able to push your code to GitHub repo.
After spending hours looking for the solution to this problem, I finally struck gold by making the changes mentioned on an Eclipse Forum.
Steps:
Prerequisites: mysysgit is installed with default configuration.
1.Create the file C:/Users/Username/.ssh/config (Replace "Username" with your Windows 7 user name. (e.g. C:/Users/John/.ssh/config)) and put this in it:
Host github.com
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
2.Try setting up the remote repository now in Eclipse.
Cheers. It should work perfectly.
I discovered that if I set up the two-step authentication in github, Eclipse isn't able to connect to Github - which makes sense because the two-step authentication in github requires you to input a number from an SMS (and Eclipse wouldn't have this information).
If this is your scenario, you might consider de-activating your two-step authentication in github, and see if that helps.
On Windows, setting GIT_SSH
to openssh that comes with msys git didn't work (Eclipse hung during commit). Setting it to TortoisePlink solved the problem (I guess original plink would work as well). The added bonus is now Eclipse uses keys stored in pageant.