3

I want to use a repository i hosted on github but it seems like netbeans uses a wrong fingerprint. So I get an Exception everytime I try to clone the repository. Its like : UnknownHostKey: github.com. RSA key fingerprint is xxxxxxxxxxxx etc. And it aborts. Any idea?

Ive tried it with tortisegit and it works fine ... but I think it saves the key on a custom place.

lain
  • 31
  • 1
  • 2
  • Which git support do you use in Netbeans ? the millestone of Netbeans 6.10 (it's an alpha) which includes git support or http://nbgit.org/ ? What are you using as OS (linux, windows, Mac OS X) ? – Kartoch Aug 10 '10 at 12:17
  • I use the nbgit plugin and right now im using windows but Im working more often with OSX ... does that make any diffrence? – lain Aug 10 '10 at 12:21
  • Which ssh key is netbeans using? – Arafangion Aug 10 '10 at 12:25
  • That does make a difference - does each system have its own ssh key, or do you keep them synchronized? – Arafangion Aug 10 '10 at 12:27
  • ok so I figured out that the key in the error message is the public key from github (16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48) and I dont know where netbeans get its own key. I have a .ssh folder in c:/users/myusername with a private and public key file. – lain Aug 10 '10 at 12:42
  • Good, now check your ~/.ssh directory on your mac. – Arafangion Aug 10 '10 at 12:44
  • I dont have access to my mac right until evening... so thats why I try to get netbeans/windows working! I dont know if netbeans regocnize the .ssh folder, anyway I can check that? – lain Aug 10 '10 at 13:02
  • What is likely the problem is that your private key is different between your mac, and your PC, yet you're trying to say that you're the same as the person using the mac. (The keys are different, therefore, you're a different person). – Arafangion Aug 10 '10 at 13:15
  • ok i think youve got the wrong thing ... its the first time I try to get netbeans(for now on windows and later also on my mac) working with any git server. So mainly I just want to create a git repo and get it working with netbeans... and on my pc I have tortisegit and it asks me if I want to use the fingerprint given me from the server side and it works well.. but Netbeans dont do such a thing therefore I wanted to know where I can configure the ssh key for netbeans – lain Aug 10 '10 at 13:24
  • You could try renaming your known hosts file. If the hosts have changed (a possible man-in-the-middle attack), then that would do it, too. – Arafangion Aug 10 '10 at 13:25
  • what do you mean with host file? – lain Aug 10 '10 at 13:32
  • if you mean the known_hosts file .. there is already a entry with "github.com,207.97.227.239 ssh-rsa AAAAB..." – lain Aug 10 '10 at 13:37

2 Answers2

1

I faced similar issue while accessing my own git server from NetBeans on windows. To fix this I created known_hosts file manually in "c:\Documents and Settings\myusername\.ssh" and put entry of my git server host. (I got this entry from other linux box from where I do ssh to git server)

After restarting NetBeans it wokred! I could clone my git repository using URL gitosis@my-git-server:my_porject

My setup -

I use NetBeans 6.9.1 on Windows XP.
In dir c:\Documents and Settings\myusername\.ssh, I have -
id_rsa
id_rsa.pub
known_hosts
(id_rsa and id_rsa.pub - same keys I was using on my linux box)
i.scorpion
  • 11
  • 2
1

had the same problem as you did, but actually putting the public key of the remote repository in known_hosts worked for me. I did this simply by calling ssh github.com - it will inform you about the fact, that the authenticity of the host can't be established. if you connect anyway, the host public key will be added to known hosts and after restarting netbeans, they no more report this error and work fine.

hope this helps