Skip to main content

Eclipse + EGit - "The authenticity of host ... can't be established" challenge

Recently while writing new Android code I decided that it's the highest time to have a Git repository not only on my hard drive, but also safe in the Internet. After quick search and finding out that I have accounts at almost every popular service that provides Git hosting, I figured out that one that covers everything I need (wiki, bug tracking, code hosting, forums) is the good old sourceforge.

I used it also with no problems few months ago on another mobile project, so I was hoping that pushing code there will be a piece of cake.

But then when I tried to do it (after configuring the project on the sourceforge site), I got very interesting error:

ssh://USER@git.code.sf.net:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host 'git.code.sf.net' can't be established. RSA key fingerprint is 86:7b:1b:12:85:35:8a:b7:98:b6:d2:97:5e:96:58:1d. Are you sure you want to continue connecting?

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.

I did some googling and it was obvious that what is missing is the entry in the known_hosts file. The sad thing is that putty no longer stores "approved" hosts in that file (it uses registry) and I couldn't find any tutorial suggesting how to add the entry manually (since Eclipse apparently didn't want to do it).

So if you're in the same situation - here's the result of my moment of enlightenment:

  1. In Eclipse switch to "Git Repositories" perspective 
  2. Expand your project, add new Remote repository(I called it "sourceforge") - see  http://wiki.eclipse.org/EGit/User_Guide#Adding_a_Remote_Configuration for details
  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" 

Enjoy, I hope it will help you too!
Tired of remembering your conference call details? Try Conference Call Dialer for Android - simple solution for your conference call challenges.

Comments

  1. Thank you! This saved me a lot of trouble.

    ReplyDelete
  2. I am not finding the option to add new remote repository in 'Git Repository Exploring' perspective. Any idea?

    ReplyDelete
    Replies
    1. Tahir, please see http://wiki.eclipse.org/EGit/User_Guide#Adding_a_Remote_Configuration for more details. In general you first need to establish your local Git repository (referred as "the project" in the description above), then connect it to remote sourceforce Git repository.
      Let me know if it helped!

      Delete
  3. I just wanted to say thanks. I ran into the same issue although I wasn't using sourceforge, but gitorious.

    ReplyDelete
  4. This doesn't work anymore with the new ADT distribution (21.1.0), and I haven't figured out a solution yet.

    ReplyDelete
    Replies
    1. I see that I have ADT 21.1.0.v20130206 installed and I am still able to use sourceforge, so a potential workaround is to take the older version of ADT, perform the steps described above and then upgrade to the latest version. I know it's not very cool, but maybe it will work :)

      Delete
  5. Just saved me some headache pushing to assembla, cheers!

    ReplyDelete
  6. This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up salesforce Online Training Bangalore

    ReplyDelete
  7. Thanks for your post! I believe there are many who feel the same satisfaction as I read this article! I hope you will continue to have such articles to share with everyone!

    GitHub Review

    ReplyDelete
  8. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.


    Salesforce Developer Training

    ReplyDelete

Post a Comment

Popular posts from this blog

HTTPS for dummies - so how HTTPS really works in 5 mins

What is HTTPS? HTTPS (HyperText Transfer Protocol Secure) is a way of transferring data over internet in a secure manner. It's achieved through adding SSL (Secure Socket Layer)/TLS (Transport Layer Security) on top of standards HTTP. What HTTPS gives us? End-2-end encryption of data - from the browser to the server and back = even if someone reads the data you are sending, they will not be able to understand anything out of it Confirmation of the identity of the website we are accessing = you are sure that the website that looks like your bank is actually your bank (and not a phishing website) How does it work? First you need a pair of SSL certificates: One installed in your web browser (in most cases shipped together with your browser, provided by one of so-called trusted Certificate Authorities) One installed on the website (which is acquired by the website owner) Each of those SSL certificates includes the following information:  Public information: name of

How to make Logitech Trackball Marble Wheel work

If you bought Trackball Marble from Logitech, the first challenge you encounter is probably related to the lack of the wheel button. Unfortunately the software provided with the device for Windows doesn't help (neither Universal or Auto Search aren't really working as I was expecting). Internet suggests mostly one option, app called Marble Mouse Scroll Wheel http://marble-mouse-scroll-wheel.software.informer.com/ To some extent it works, but I wasn't able to make it work in google maps or in picture viewer. Moreover setting where crashing very often (I am running windows 7 64 bits). Fortunately there is a way to have a semi-wheel button behavior with this trackball, but with a different software - X-Mouse Button Control: http://www.highrez.co.uk/downloads/XMouseButtonControl.htm Setup Mouse button 4 and 5 as wheel up and wheel down. Then also update Logitech SetPoint settings to replace the behavior of those button to default. Voila - now you can emulate wheel