Ubuntu 18.04 Git starts its own ssh-agent instead of using the existing agent

1k Views Asked by At

I'm having an issue I don't fully understand with my new machine where the first time I run a git command after a restart, it starts its own ssh-agent instead of using the existing one that already has my key added. Symptoms are as follows:

When I first restart my machine and open a new terminal, I run ps aux | grep [s]sh-agent and get

me+ 3924 0.0 0.0 11308 320 ? Ss 20:19 0:00 /usr/bin/ssh-agent /usr/bin/im-launch env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu

Running env|grep SSH gives me

SSH_AUTH_SOCK=/run/user/1000/keyring/ssh SSH_AGENT_PID=3924

And ssh-add -l returns the right fingerprint

BUT as soon as I run any git command, I get prompted for my ssh password and I end up with two ssh-agents

me+ 3748 0.0 0.0 11308 328 ? Ss 20:37 0:00 /usr/bin/ssh-agent /usr/bin/im-launch env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu me+ 13364 0.0 0.0 11304 1524 ? S 20:40 0:00 /usr/bin/ssh-agent -D -a /run/user/1000/keyring/.ssh

This is only mildly annoying, once per restart which hopefully will be less often as I get this machine more situated, but annoying enough that I want to get to the bottom of it and I have no idea where to start; I haven't seen this issues with previous machines. Can someone point me in the right direction?

0

There are 0 best solutions below