git上添加了公钥,每次更新还是要提示输入密码的解决办法

问题:
每次执行git pull后会提示输入公钥密码

Enter passphrase for key '/root/.ssh/id_rsa':

解决办法参考:
http://askubuntu.com/questions/362280/enter-ssh-passphrase-once
依次执行:

$ssh-agent bash
$ssh-add /home/username/.ssh/id_rsa
Enter passphrase for /home/username/.ssh/id_rsa: 
Identity added: /home/username/.ssh/id_rsa (/home/username/.ssh/id_rsa)

输入密码后,出现Identity added后解决。