How to push a new project in Github from Eclipse?

前端 未结 3 1925
不思量自难忘°
不思量自难忘° 2021-02-02 17:59

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.

相关标签:
3条回答
  • 2021-02-02 18:21
    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

    0 讨论(0)
  • 2021-02-02 18:22

    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.

    0 讨论(0)
  • 2021-02-02 18:26
    ssh-keyscan github.com >> ~/.ssh/known_hosts
    
    0 讨论(0)
提交回复
热议问题