12

I am trying to push my new project in recently created Github repository. But having SSH authentication issue. I don't know the key management, as which key is to used and how. In my github web dashboard I have 2 keys. One with my login account and one with Github for Windows.

How can I use the correct key for committing. Because this key is not what mentioned in my Github dashboard. I created new RSA Key in Eclipse. Saved it with Passphrase. And added this key into my Github account. But still it's showing me following key fingure print.

Any help?

My repos: https://github.com/tahirakram/Likhari

URL Information

Location URL

Getting this error about SSH Keys

Getting this error about SSH Keys

Tahir
  • 3,344
  • 14
  • 51
  • 69

3 Answers3

18
ssh://git@github.com:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:  
The authenticity of host 'github.com' can't be established.  
RSA key fingerprint is 16:27:ac:a5:xx:xx:xx:xx:xx:xx:a6:48.  
Are you sure you want to continue connecting?

This page (from Lech Migdal's blog ) recommends:

In theory it's nothing bad, you press the "Yes" button and you're done.

But to my surprise there was no "Yes" button :-) Only "OK" and "Details", both of them didn't result in the code being pushed to the sf.net. Restart (as suggested on some sites) didn't help.

  1. In Eclipse switch to "Git Repositories" perspective
  2. Expand your project, add new Remote repository (I called it "sourceforge")
  3. Paste the URI that sourceforge provides on your project website and the proper password (yes, this time it will work)
  4. Now Eclipse will ask you if you trust the RSA key fingerprint and will add it to known_hosts file
  5. "Dry-Run" (should work), "Save"

This page also ask you to check your SSH settings.

Point 2 is better illustrated by the section "Adding a Remote Configuration" of the Egit User Guide:

This is done using a context menu action on the "Remotes" node.
A wizard is started asking for the name of the new configuration and whether to configure Fetch, Push, or both:

New Remote

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • In second screenshot, I am not getting Yes and No button combination. When I press Ok. It lands me to the previous screen and I can not do any thing. All controls disabled. Except Back and Cancel button. – Tahir Nov 03 '12 at 12:15
  • @TahirAkram I agree and that is what I wrote in the answer. What about the process I describe just *after* having written what you mention? Does it help? – VonC Nov 03 '12 at 12:22
  • Unable to find out, how to add remote repository in Git Repositories perspective. – Tahir Nov 03 '12 at 12:30
  • 1
    @TahirAkram follow http://wiki.eclipse.org/EGit/User_Guide#Adding_a_Remote_Configuration – VonC Nov 03 '12 at 12:35
  • 1
    creating a new remote git repo did the trick for me.. provided you have a passphrase defined for the fingerprint. – faizanjehangir Jan 20 '14 at 12:21
0

You will get that error message for every new host, when you connect the first time using SSH. Potentially a malicious person could have set up a server, which now answered your request, but is not the real github.com server. That is why you should verify the fingerprint and that is what the whole error message wants to tell you.

If you accept that dialog, it will work fine afterwards.

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
  • I pressed Ok. But my next window has all its controls disabled. Except Back and Cancel. – Tahir Nov 03 '12 at 12:13
  • You have to specify source ref and destination ref, before you can use any of the buttons in the dialog. Please have a look at the egit github tutorial at http://wiki.eclipse.org/EGit/User_Guide#Github_Tutorial – Bananeweizen Nov 03 '12 at 12:20
  • All controls are disabled, not allowing me to enter anything. – Tahir Nov 03 '12 at 12:31
0
ssh-keyscan github.com >> ~/.ssh/known_hosts
ROOT
  • 1,757
  • 4
  • 34
  • 60