Almost no guide I found on the Internet about ssh-agent worked for me and writing a passphrase on every pull and push is tedious. So here is my working solution for Kubuntu 14.04. These are the steps needed for ssh-agent and ssh-add to automatically take your passphrase from Kwallet in Kubuntu.
-
First download ksshaskpass
apt-get install ksshaskpass
-
Then modify your
.bashrc
file and append this to the endecho "----Starting ssh-agent and ssh-add----" eval $(ssh-agent) export SSH_ASKPASS=/usr/bin/ksshaskpass ssh-add </dev/null echo "--------------------------------------"
- Make sure KWallet is enabled, or it will ask for a passphrase everytime you open a new Konsole window.
- Open a new Konsole window and you’ll be asked for a passphrase one last time.
-
You can test that everything is working properly by going to a git repository and fetching
git fetch