Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Egit Refuses to accept id_rsa

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 me the error "Cannot list available branches. Reason: ssh://[email protected]:22 Passphrase for /Users/elifinkelshteyn/.ssh/id_rsa." This is really strange as I can clone through terminal using that same id_rsa just fine, and I've verified in Eclipse ssh properties that it is trying to use the correct key. What gives?

like image 622
Eli Avatar asked Aug 22 '11 19:08

Eli


1 Answers

if you get a prompt for the passphrase but eclipse doesn't accept the passphrase, try the following:

set the GIT_SSH environment variable to your ssh client e.g. by adding

export GIT_SSH=/usr/bin/ssh

to your .bash_rc

on Mac OSX, open terminal and type:

cd
mkdir .MacOSX
cd .MacOSX
echo "" > environment.plist
open environment.plist

add a KEY=GIT_SSH with VALUE=/usr/bin/ssh and save the file.

After relogin to your account, it should work.

like image 112
Carsten D. Avatar answered Oct 07 '22 08:10

Carsten D.