8

I'm using Egit with Eclipse to use git and access github. Everything is working fine but one thing that I wish to omit to type id_rsa key passphrase everytime I push my commit to github.

I'm asked to enter passphrase each time I restart Eclipse and try to push.

Passphrase Request

How can I make eclipse remember passphrase so that I don't have to type manually?

Thanks

TheKojuEffect
  • 20,103
  • 19
  • 89
  • 125

2 Answers2

6

Even if ssh-add -l lists your passphrase-protected key, EGit may not honour it and still ask for passphrase.

To integrate with OS keyring on Ubuntu or Mac OS X put

export GIT_SSH=/usr/bin/ssh

to your ~/.bash_aliases or whenever applicable for your OS.

Matt Warrick
  • 1,385
  • 1
  • 13
  • 22
0

Use the ssh agent.

Add your key to the agent with ssh-add. (This will ask you for your passphrase.)

Afterwards the agent should do all the authentication. (No passphrase needed anymore.)

Details:

  • try to access your repository manually: cd $your_repository; git fetch -> it should ask for your passphrase
  • enter ssh-add -l -> it should output "The agent has no identities."
  • enter ssh-add -> it should ask you for your passphrase
  • enter ssh-add -l -> it should list one identity (the key you just added)
  • try to access your repository again: cd $your_repository; git fetch -> it should now work without asking for your passphrase
  • try to access your repository from eclipse. -> again, no passphrase should be needed.
michas
  • 25,361
  • 15
  • 76
  • 121
  • Thanks but still I can't figure out how to do it. Can you explain in little more detail? – TheKojuEffect Apr 29 '13 at 15:33
  • 1
    `git fetch` didn't ask for my passphrase may be because I've set up to remember passphrase when I'm logged into my ubuntu system. Also `ssh-add -l` shows the key that is added. The problem is only when pushing from `Eclipse`. – TheKojuEffect Apr 30 '13 at 02:06
  • In that case you should raise a bug against egit. (But check first for possible egit options in eclipse.) – michas Apr 30 '13 at 07:43