ssh-agent: sometimes SSH_AUTH_SOCK is not set
Usually my SSH private key is unlocked automatically by gnome-keyring-daemon. However, sometimes on a fresh boot, it doesn't work, and I get prompted for my password in the terminal instead.
After a bit of investigation, I noticed that in such case, the environment variable SSH_AUTH_SOCK
is not set. Please correct me if I'm mistaken, but gnome-keyring-daemon is suppose to set the value of the environment variable SSH_AUTH_SOCK
, isn't it? That's what it seems from https://gitlab.gnome.org/GNOME/gnome-keyring/blob/master/daemon/gkd-glue.c#L61
So, I tried to close and restart the terminal, but SSH_AUTH_SOCK is still empty. I tried to restart the keyring daemon:
$ gnome-keyring-daemon -r -d
** Message: 09:28:16.332: Replacing daemon, using directory: /run/user/1000/keyring
GNOME_KEYRING_CONTROL=/run/user/1000/keyring
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Still, the variable is not set in the environment. Sure, I can manually run export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
, but why doesn't gnome-keyring-daemon do that for me when I restart it?
Any idea?
Also, is there any chance I can run gnome-keyring-daemon with debug messages without rebuilding it?
This is happening on:
- debian unstable
- gnome-keyring 3.28.2-1
Thanks!