I'm pulling my hair out on an ssh-agent issue..
I run a VPS under Ubuntu 16.04 and I setup a private/public key to be able to pull code from my Bitbucket repo. I initialized the repo, it all seemed to work fine, and a couple of days later, when I try to pull again, it tells me that the key is not valid.
ssh-add -l says "Could not open a connection to your authentication agent." - so I figure I just have to restart the ssh-agent.. but I always end up getting the same "Could not open a connection to your authentication agent." message.
me@ip:~/.ssh$ eval `ssh-agent -s`
Agent pid 3820
me@ip:~/.ssh$ ssh-add -l
Could not open a connection to your authentication agent.
I've tried rebooting the machine and attempting again but that's no good.. I've run out of ideas from all the posts I've read so.. any suggestions?
ssh-agent
work as it is expected. You could try to use~/.ssh/config
file instead that, here in section 2. is presented a short example: https://askubuntu.com/a/986245/566421 – pa4080 Apr 03 '18 at 09:13github.com
by this definitionHost github.com IdentityFile ~/.ssh/git/id_rsa
... – pa4080 Apr 03 '18 at 11:17