Gpg-agent for ssh with Yubikey

Hi,
I have recently switched to Fedora for my workstation (previously it was on Arch). The problem I’m having is with using gpg-agent for ssh authentication with Yubikey. While I can set SSH_AUTH_SOCK env var to point to gpg agent socket file (SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" or output returned by gpg-agent) and it’s discovered by ssh related commands the problem I’m having is that it’s not set as environment variable for all the applications and because of this I can’t use git from PhpStorm or any other program which is not run from terminal. In Arch usually this is put into ~/.pam_environment which makes it available to all applications but on fedora .pam_environment is not loaded due to some security issue?
Do you maybe have other way of setting env variable so that it’s accessible to all applications?
I’ve tried setting it in /etc/enviroment and also in /etc/security/pam_env.conf but there $XDG_RUNTIME_DIR is not set so I can’t make it independent of user id.

Thanks.

Arch Wiki:

Probably it’s valid for Fedora?  IDK.

2 Likes

It works like a charm. Thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.