You are not logged in.
I did a full update yesterday and rebooted. Today I realized, that I can't authenticate towards GitHub/GitLab. I'm getting an error like this:
$ git push
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
My keys are all in ~/.ssh/, also the config file is correct.
So, I assumed it might have something to do with SSH and took a look at the forum. I found this - solved - thread https://bbs.archlinux.org/viewtopic.php?id=292403. Unfortunately, the solutions are unclear to me. Some of the files do not exist and there are multiple solutions mentioned. Is a reboot required?
$ systemctl --user enable gcr-ssh-agent.socket
Failed to connect to bus: No medium found
$ systemctl start gcr-ssh-agent.socket
Failed to start gcr-ssh-agent.socket: Unit gcr-ssh-agent.socket not found.
$ less /etc/profile.d/ssh_auth_gcr.sh
/etc/profile.d/ssh_auth_gcr.sh: No such file or directory
So, instead of crazily creating files and configurations, which I do not fully understand, I wanted to first do the homework:
I use GNOME, have gcr-4-4.2.0-1, seahorse and GNOME keyring installed.
The thread mentions https://wiki.archlinux.org/title/GNOME/Keyring#SSH_keys and changes in GNOME keyring. There it says:
The SSH functionality is disabled by default in gnome-keyring-daemon builds since version 1:46. It has been moved into /usr/lib/gcr-ssh-agent, which is part of the gcr-4 package. The plan is to completely remove the implementation in gnome-keyring-daemon.
$ gnome-keyring-daemon --version
gnome-keyring-daemon: 46.1
testing: enabled
The below section on set up says:
Setup gcr
1. Enable the gcr-ssh-agent.socket systemd user unit.
2. Run SSH commands with the SSH_AUTH_SOCK environment variable set to $XDG_RUNTIME_DIR/gcr/ssh. There are many ways to set environment variables, and the one you use will depend on your specific setup and preferences.
Unfortunately enable the gcr-ssh-agent.socket systemd user unit does not work (see above).
Now I am a bit stuck and would like to get a suggestion how to proceed.
Last edited by Rec100 (2024-02-23 16:48:37)
Offline
If that systemctl --user command doesn't work then your login session is broken. What are you using to login/starting your graphical environment. Output of
printenv
loginctl session-status
?
Last edited by V1del (2024-02-23 14:40:22)
Offline
The system bus issues notwithstanding, you'll still have to add the profile.d drop in and export the environment there (until anyone figured a narrower context for this)
Online
The system bus issues notwithstanding, you'll still have to add the profile.d drop in and export the environment there (until anyone figured a narrower context for this)
I've added the file /etc/profile.d/ssh_auth_gcr.sh with 'export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh'. This did the trick after a reboot. Thank you.
For the systemd issues, I might open another ticket, to keep things separated.
Offline
seth wrote:The system bus issues notwithstanding, you'll still have to add the profile.d drop in and export the environment there (until anyone figured a narrower context for this)
I've added the file /etc/profile.d/ssh_auth_gcr.sh with 'export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh'. This did the trick after a reboot. Thank you.
For the systemd issues, I might open another ticket, to keep things separated.
Same problem here after a system upgrade. Fixed thanks to your comment.
Offline