You are not logged in.

#1 2016-04-24 17:12:00

marmistrz
Member
Registered: 2016-01-05
Posts: 129

Git stopped showing a GUI prompt to unlock the SSH key for a single ke

Something weird is going on. I have two keys:

./.ssh/aur.pub
./.ssh/id_rsa.pub

When I clone something from AUR, I get a GUI/keyring dialog to enter the password, and it is remembered until I reboot. But with my default key, I get the terminal prompt, and not the GUI/keyring one, so I have to type the password each time.

What's going on out there?

Offline

#2 2016-04-24 20:03:05

nartes
Member
From: Minsk, Belarus
Registered: 2014-07-05
Posts: 62
Website

Re: Git stopped showing a GUI prompt to unlock the SSH key for a single ke

Hi, marmistrz!

Questions:
Do you know the GUI/keyring program that was popping up to you with password prompt?
How much time do you have to solve this problem?
What is the severity of the issue?
Do you know somebody else with the same issue?
What is your level of understanding linux?


Default procedure:
1. Describe your desktop environment
2. Provide system log during clone attempts

journalctl -S -2h > system.log
dmesg > dmesg.log

Recommendation:
1. Remove any personal information before pasting any logs to internet, it can be used against you! smile, just be carefull

Offline

#3 2016-04-28 18:49:35

marmistrz
Member
Registered: 2016-01-05
Posts: 129

Re: Git stopped showing a GUI prompt to unlock the SSH key for a single ke

I suspect that it's the Gnome Keyring or something like that. But I'm not sure. The same thing is provided by the default Cinnamon desktop, this I konw.
It's just slightly uncomfortable, so it's not urgent.
Nope, I don't know anyone with this issue.
I've been using Linux for 6 years, I feel very comfortable in shell.

Desktop environment: Cinnamon, LightDM.
Logs: http://paste.ubuntu.com/16117019/ http://paste.ubuntu.com/16117020/

Offline

#4 2016-05-11 14:40:40

nartes
Member
From: Minsk, Belarus
Registered: 2014-07-05
Posts: 62
Website

Re: Git stopped showing a GUI prompt to unlock the SSH key for a single ke

Hi, marmistrz!

To use any private keys for authorization you need ssh-agent. It can be ssh-agent from openssh package,
or it can be Gnome Keyring SSH Agent. Then you should add your keys to the agent. After that ssh client
should be aware of agent activity in some way. By default it is done
via exporting environment variable SSH_AUTH_SOCK.

So checkout SSH_AUTH_SOCK in your shell

echo $SSH_AUTH_SOCK

For ssh-agent it looks like $TMPDIR/ssh-XXXXXXXXXX/agent.ppid,
while for gnome keyring ssh agent it is /run/user/<USER_ID>/keyring/ssh.

GK ssh-agent might be started up via dbus. Checkout

systemctl --user status

Type /gnome-keyring and press n key to search for any instance of gnome-keyring-daemon.

In case of absence of one start it again.  In package gnome-keyring exist few desktop files.

% pacman -Ql gnome-keyring | grep -e 'xdg/autostart/.*desktop'
gnome-keyring /etc/xdg/autostart/gnome-keyring-pkcs11.desktop
gnome-keyring /etc/xdg/autostart/gnome-keyring-secrets.desktop
gnome-keyring /etc/xdg/autostart/gnome-keyring-ssh.desktop

Run gnome-keyring-ssh with command

% dbus-launch --exit-with-session /usr/bin/gnome-keyring-daemon

For GUI management of keys you can use seahorse front-end.

For more information see manuals for ssh-agent, ssh-add,
gnome-keyring, gnome-keyring-daemon, seahorse, dbus-launch,
perhaps ssh-keygen.
Also here you can find relevant info about Gnome Keyring SSH Agent
https://wiki.gnome.org/Projects/GnomeKeyring/Ssh.

Offline

#5 2016-07-11 10:14:50

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: Git stopped showing a GUI prompt to unlock the SSH key for a single ke

I have the same problem, it worked until recently. Something probably changed in how gpg-agent or ssh-agent work.

Offline

#6 2016-07-11 11:57:58

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: Git stopped showing a GUI prompt to unlock the SSH key for a single ke

I've finally solved this mistery!

From Wiki: https://wiki.archlinux.org/index.php/GnuPG#SSH_agent

says that you need to add this:

# Set SSH to use gpg-agent
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
  export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
fi

Well, instead of  export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" I had export SSH_AUTH_SOCK="/$HOME/.gnupg/S.gpg-agent.ssh" (from old wiki entry which is now changed to reflect changes from gnupg).

Offline

Board footer

Powered by FluxBB