EGit - SSH Fails at Passphrase (when connecting to GitHub)

白昼怎懂夜的黑 提交于 2019-11-30 01:41:59
Yohan Liyanage

Got it sorted out by following this link http://www.eclipse.org/forums/index.php/t/197428/.

I created an environment variable GIT_SSH which points to /usr/bin/ssh (which was the SSH implementation I was using in command line) and started Eclipse. When this environment variable was present, Eclipse connected using my shell's SSH tool and there was no prompt for pass phrase and it worked fine.

Even simpler is to update the JSch bundle to 0.1.44 from eclipse orbit repository (p2 software site): http://download.eclipse.org/tools/orbit/downloads/drops/R20110523182458/repository/

The underlying problem is actually that JSch < 0.1.44 does not support the newer encryption scheme AES-128:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=326526

On Eclipse Juno, Jsch is already > 1.44 and yet the problem still happens (for me). I also tried setting GIT_SSH and this didn't work either. My previous keys had been generated by ssh-keygen, I can only guess that this doesn't generate a suitable key.

What I did that worked was this:

  • Use Eclipse to generate a new DSA key - creating a 1024 bit key Eclipse->Preferences->General->Network Connections->SSH2->Key Management

    [It might work with RSA I didn't try]

  • Copy the generated public key to the remote repo

  • Click the [Save Private Key] button without entering a passphrase

  • RESTART ECLIPSE

Eclipse/EGit will now synch with the remote Git Repo, without requiring a passphrase - phew!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!