Ubuntu – How to disable gnome-keyring ssh integration

gitgnomekeyringsssh

I don't want gnome-keyring to get in the way of my git commits, partially because it locks the entire screen while asking for a password, even on KDE (though I have now switched to GNOME). While I do appreciate the convenience of not having to put my SSH passphrase in each time, having to jump from window to window cancels that out personally. It's just a comfort thing :/

I tried git config --global --unset credential.helper and git config --system --unset credential.helper, but they seem to have no effect. As I'm now using GNOME, I'd rather not remove gnome-keyring. Is there any other option I can do? I'm presently on Ubuntu 14.10, having done this both with Kubuntu and with Ubuntu GNOME. Thanks.

UPDATE 17 November 2014

This apparently affects all of SSH. I tried doing

sudo rm /etc/xdg/autostart/gnome-keyring-ssh.desktop

but that did not work. I CAN do

gnome-keyring-daemon --replace -c pkcs11,secrets,gpg

once each session, but I would like to keep that permanent. Still looking…

Best Answer

Just copy the relevant .desktop file from /etc/xdg/autostart to ~/.config/autostart and add Hidden=true to it:

(cat /etc/xdg/autostart/gnome-keyring-ssh.desktop; echo Hidden=true) > ~/.config/autostart/gnome-keyring-ssh.desktop

then reload gnome-shell (press Alt + F2, then type r and press Enter).

This is the only user-friendly solution that has worked for me (ie not having to softlink the .desktop file to /dev/null or chmod 0 the gnome-keyring-daemon). In fact, softlinking to /dev/null stopped working for me in GNOME 3.16.

Credit goes to nus.

Related Question