Skip to content

KeepassXC not finding my running ssh-agent #3683

@rsevero

Description

@rsevero

When opening KeePassXC in my Artix machine I get the following error message:

No agent running, cannot add identity.

but I already have a ssh-agent running with the same user as I run KeepassXC as you can see below:

ps axuwf | grep ssh-agent
rodrigo   3449  0.0  0.0   5792   456 ?        Ss   06:36   0:00 ssh-agent

and

$ ps axuwf | grep keepassxc
rodrigo   4973  2.2  1.0 701136 84028 ?        SLl  07:15   0:01          |   \_ keepassxc

ssh-agent is setting the necessary environment variables, AFAICT:

$ set | grep SSH
SSH_AGENT_PID=3449
SSH_AUTH_SOCK=/tmp/ssh-2gEren5eA1JD/agent.3448

and ssh-agent's socket exists and is writeable by the appropriate user:

$ ls -Flah /tmp/ssh-2gEren5eA1JD/agent.3448
srw------- 1 rodrigo rodrigo 0 out 27 06:36 /tmp/ssh-2gEren5eA1JD/agent.3448=

Expected Behavior

I expected that when starting, KeePassXC managed to add my keys to the already running ssh-agent

Current Behavior

Keys aren't added to my ssh-agent

Steps to Reproduce

  1. Have ssh-agent started by ~/.bashrc through the following code:
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
    ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
    eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
fi
  1. Login KeePassXC
  2. See the error message "No agent running, cannot add identity.¨

Context

I can't identify any special circunstances that affect me. I believe I have a rather standard ssh-agent and KeePassXC install.

Debug Info

KeePassXC - Version 2.4.3
Revision: 5d6ef0c

Operating system: Linux Artix
CPU architecture: x86_64
Kernel: Linux version 5.3.6-artix1-1-ARTIX (builduser@orion) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Sun Oct 13 15:42:39 UTC 2019

Plese let me know if you need any extra info.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions