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).
Have you tried to use the ssh protocol instead on git+ssh ?
I've got the same problem, and that solved it, even though official documentation tells to use 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.
Copy your generated public key (in a
box just below "Generate RSA Key..."
button) and add it to your GitHub
account.
Press "Save Private Key..." button
to save your private RSA key into
file. By default keys are stored in
SSH2 home directory (see "General"
tab).
That's it! Now you should be able to push your code to GitHub repo.
I had exactly same problem but I found the cure from a Eclipse bug report!
An environment variable named GIT_SSH must be set with a path to a ssh executable [1].
For example on Ubuntu Linux (10.10 64bit):
> export GIT_SSH=/usr/bin/ssh
> eclipse
After that pushes to GitHub repository work like they should. I tested this with Eclipse Galileo and Indigo.
The problem is really annoying and the solution is far from nice. For now, making the solution permanent for, at least Ubuntu users, one must make the env variable permanent. It can be done by adding the export command to ~/.profile or ~/.bashrc [2]. For example:
> cd ~
> echo "export GIT_SSH=/usr/bin/ssh" >> .profile
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.
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.
Make sure the username for your account on your local machine does not differ from the username for the account on the server. Apparently, eGit does not seem to be able to handle this. For example, if your username on your local machine is 'john', and the account you are using on the server is named 'git', egit simply fails to connect (for me anyways). The only work around I have found is to make sure you have identical usernames in both the local machine and the server.
IF YOU HAVE PEM FILE: In Eclipse go to Window > Preferences > Network Connections > SSH2, and then add path to your PEM file to "Private keys" and that should solve the problem.
For you who, like me, already did setup you ssh-keys but still get the errors:
Make sure you did setup a push remote. It worked for me when I got both the Cannot get remote repository refs-problems ("... Passphrase for..." and "Auth fail" in the "Push..." dialog).
Provided that you already:
Setup your SSH keys with Github (Window > Preferences > General > Network Connections > SSH2)
Setup your local repository (you can follow this guide for that)
Paste your git URI and select protocol ssh --> click "Finish"
Now, click "Save and Push" and NOW you should get a password prompt --> enter the public key passphrase here (provided that you DID (and you should) setup a passphrase to your public key) --> click "OK"
Now you should get a confirmation window saying "Pushed to YourRepository - origin" --> click "OK"
Push to upstream, but this time use "Configured remote repository" as your Destination Git repository
I wanted to make public once me too a google code fix and got the same error.
Started with This video, but at Save and publish got an error.
I have seen there are several question regarding to this. Some are Windows users, those are the most lucky, because usually no problems with permissions and some are Linux users.
I have a mac for mobile development use and very often meet this problems. The source for this problems is the "platform independent" solutions, which doesn't care enough for mac and they don't have access to keychain, where are stored the certificates, .pem files and so on.
All I wanted is to not make any environment settings, nor command line, just simple GUI based clicks, like a regular user.
Half part was done with Eclipse Git plugin, second part (push to Github) was done with Mac Github
Nice and easy :)
All can be done with with that native appp if I would start to learn it, I just need the push functionality from him.
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.
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.
Then you can load the key again in eclilpse by using
Preferences -> Network connections -> SSH2, click "Add Private Key"
(still select your private key, even you already see the name in the list of private keys, because eclipse has to reload it)