I use ssh-keys to access the remote git server (e.g. github/gitlab). My ssh-key is protected by a password. Thus when I call a git command with the remote, it will require me to enter the password for my key.
An alternative, is to use an ssh-agent. Within a given shell, I could do
eval `ssh-agent -s`
This will require my password, but then all the git commands following would not require to enter it anymore.
Now, all of the above works equally well within a vim-terminal. The draw-back, and hence my question, is that if I close that terminal, I would need to call a new ssh-agent within the next terminal.
System-wide ssh-agent would cover it, but in this case, I am essentially limited to an access with a single shell.
How can I get an ssh-agent active for all the vim-terminal for a given session?