You are not logged in.

#1 2015-06-07 08:39:57

sandnon
Member
Registered: 2011-11-21
Posts: 11

Same code works well in .zshrc but buggy in .zshenv

I am trying to configure gnome-keyring to store ssh keys and git keys.
At first, gnome-keyring works well on git keys, but it cannot work on ssh keys. ssh still ask for passphrase.

So I followed wiki and add the code below to .zshenv

if [ -n "$DESKTOP_SESSION" ];then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
fi

I run awesome wm with slim. I think awesome does not define DESKTOP_SESSION, so I changed the code to

if [ -n "$XDG_SESSION_ID" ];then                                                                                                           
    eval $(gnome-keyring-daemon --start)                                                                                                   
    export SSH_AUTH_SOCK                                                                                                                   
fi                                                                                                                                         

Then I reboot and cd to my git directory, and run

git pull

Git stucks and said

Gkr-Message: secret service operation failed: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

** (process:1039): CRITICAL **: Error communicating with gnome-keyring-daemon

But when I put the code to .zshrc, both git and ssh work well. Can anyone tell me why?

Offline

Board footer

Powered by FluxBB