Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git credentials login through GNOME Keyring stopped working, /usr/libexec/git-core/git-credential-libsecret is missing #3109

Open
volkertb opened this issue May 5, 2024 · 2 comments

Comments

@volkertb
Copy link

volkertb commented May 5, 2024

Hello,

I noticed that since a certain Clear Linux OS update, the expected GNOME Keyring popup no longer pops up and prompts for the SSH private key password when Git tries to access an SSH private key. Instead, I have to enter the password as part of each Git command that requires access to the private key.

According to this answer on StackOverflow, GNOME Keyring depends on libsecret to handle this functionality these days.

And Git is supposed to have a credential helper for libsecret, but in Clear Linux OS, it appears to be missing, even when Git, GNOME and libsecret are installed.

The following command lists the available Git credential helpers:

ls -lh /usr/libexec/git-core/git-credential*

Which lists these:

-rwxr-xr-x 142 root root 9.2M May  4 14:06 /usr/libexec/git-core/git-credential
-rwxr-xr-x 142 root root 9.2M May  4 14:06 /usr/libexec/git-core/git-credential-cache
-rwxr-xr-x 142 root root 9.2M May  4 14:06 /usr/libexec/git-core/git-credential-cache--daemon
-rwxr-xr-x 142 root root 9.2M May  4 14:06 /usr/libexec/git-core/git-credential-store

The missing one is /usr/libexec/git-core/git-credential-libsecret. I can enter the command git config --global credential.helper libsecret, but Git keeps prompting for key passphrases on each command that needs it, which is probably because git-credential-libsecret is missing.

I also used a couple of swupd commands to find a possible bundle that might provide this, but none of these showed up anything (other than mostly development bundles or bundles that are already installed):

swupd search gnome
swupd search ssh
swupd search secret
swupd search libsecret
swupd search gcr
swupd search gnome
swupd search credential
swupd search credentials
swupd search git
swupd search secret
swupd search keyring
swupd search keychain

Any idea why the libsecret credential helper for Git is missing, and could this maybe be restored? I guess I could use git-credential-cache for the time being, but GNOME Keyring has some advantages in terms of convenience.

Thank you kindly in advance.

@volkertb
Copy link
Author

volkertb commented May 5, 2024

Okay, it looks like I misunderstood something about the credential helpers. Apparently the credential helpers (are at least some of them?) only apply to Git HTTP(S) authentication credentials, and not for the passwords (or passphrases) of private keys in the case of Git SSH authentication. But even then, why is the libsecret credential helper missing in Clear Linux OS?

@volkertb
Copy link
Author

volkertb commented May 5, 2024

OK, for people stumbling upon this thread through a search engine: This in part to this discussion on StackOverflow and this Arch Linux forum thread, I managed to have GNOME Keyring working again for remembering SSH passphrases, by running the following commands, and rebooting afterwards:

systemctl enable --user gcr-ssh-agent.service
systemctl enable --user gcr-ssh-agent.socker
systemctl enable --user gcr-ssh-agent.socket
systemctl start --user gcr-ssh-agent.socket
systemctl start --user gcr-ssh-agent.server
systemctl start --user gcr-ssh-agent.service
systemctl status --user gcr-ssh-agent.socket
systemctl status --user gcr-ssh-agent.socket
systemctl --user status gnome-keyring-daemon.service
systemctl --user enable gnome-keyring-daemon.service
systemctl --user start gnome-keyring-daemon.service
systemctl --user status gnome-keyring-daemon.socket
systemctl --user enable gnome-keyring-daemon.socket
sudo reboot

In all likelyhood, just the following would probably have been enough (I noticed that they were disabled in my system for some reason, which may have had to do something with the fact that I had uninstalled and then reinstalled the desktop bundles from my Clear Linux OS system recently):

systemctl --user enable gcr-ssh-agent
systemctl --user enable gnome-keyring-daemon
sudo reboot

Instead of rebooting, just logging out and back in might also have worked, although I didn't try that.

So the case of git-credential-libsecret missing is unrelated to this, since the Git Credentials Helpers are only for managing HTTP authentication passwords, not SSH authentication private key passphrases. But perhaps you can look into that regardless, since the libsecret credentials helper is supposed to be included with Git? Otherwise, feel free to close this issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant