问题
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.

How can I make eclipse remember passphrase so that I don't have to type manually?
Thanks
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/16280541/how-to-make-eclipse-remember-ssh-key-passphrase