funtoo / keychain

keychain ssh-agent front-end
http://www.funtoo.org
GNU General Public License v2.0
750 stars 105 forks source link

[FreeBSD] keychain does not actually set env. #85

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi!

I am trying to get keychain to work but I am experiencing a problem with it not actually setting the env: SSH_AUTH_SOCK and SSH_AGENT_PID.

It starts and apparently set everything as expected but does not work when I try to use ssh, unless I set the variables manually later, using the information given by keychain.

I am a csh user and I saw #70, tried to invert the order as stated there (gpg,ssh) but it changed nothing. Indeed, ever starting it for ssh only does not work either.

Also, it does not work with sh. Starting keychain from the sh shell or not.

The behavior is the same wherever way it is started: .xsession, shell or anything.

PS. just to point out, the gpg-agent part seem to be properly working.

FreeBSD 11.1-RELEASE keychain-2.8.3 (port, not pkg) OpenSSH (base)

Thank you!

danielrobbins commented 7 years ago

This issue has been imported into the Funtoo Linux bug tracker. This helps us to ensure that your bug is prioritized and gets the attention it deserves. You are welcome to create a Funtoo account and participate in the Funtoo Linux workflow or follow-up in the GitHub issue (comments are not currently synchronized.) Follow the action here: https://bugs.funtoo.org/browse/FL-4198

dinojr commented 6 years ago

Same problem here. I'm running keychain with

#!/bin/bash
eval `keychain --eval --agents ssh,gpg id_rsa 14498E3961F5B64FA7154EAD2A11A5D0370D5DFF`

in a shell script. Everything seems to go fine

* keychain 2.8.2 ~ http://www.funtoo.org
 * Found existing ssh-agent: 1348
 * Starting gpg-agent...
 * Adding 1 ssh key(s): /home/wilk/.ssh/id_rsa
Enter passphrase for /home/wilk/.ssh/id_rsa: 
 * ssh-add: Identities added: /home/wilk/.ssh/id_rsa
 * Adding 1 gpg key(s): 14498E3961F5B64FA7154EAD2A11A5D0370D5DFF

But right afterwards ssh-add -l complains Could not open a connection to your authentication agent

If I run the same line in a gnome-terminal

eval `keychain --eval --agents ssh,gpg id_rsa 14498E3961F5B64FA7154EAD2A11A5D0370D5DFF`

there is no problem: the ssh-agent is indeed launched.

AkashKrx commented 1 year ago

Look at this fix - https://github.com/funtoo/keychain/issues/141#issuecomment-1518512546