Egit Refuses to accept id_rsa

前端 未结 5 2573
后悔当初
后悔当初 2021-02-20 18:39

I\'m a first time git user trying to setup egit in Eclipse so I can continue to easily code through Eclipse. Problem is, every time I try to clone a repo through egit, it gives

5条回答
  •  清歌不尽
    2021-02-20 19:17

    A considerable amount of time has passed since the OP and I still had the same problem. For those who still has this problem, this might help:

    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:

    1. Setup your SSH keys with Github (Window > Preferences > General > Network Connections > SSH2)

    2. Setup your local repository (you can follow this guide for that)

    3. Created a Github repository (same guide)

    ... here's how you do it:

    • Go to the Git Repositories view (Window > Show View > Other > Git Repositories)
    • Expand your Repository and right click Remotes --> "Create Remote"
    • "Remote Name": origin, "Configure push": checked --> click "OK"
    • Click the "Change..." button
    • 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
    • Go get yourself a well earned cup of coffee!

提交回复
热议问题