SSH Agent fails to start

Ampned
Ampned
Community Member

I'm trying to use 1Password SSH to authenticate with Github. Followed the procedure in the documentation, but somehow the agent fails to start, from the logs, whenever I dis/enable the SSH agent feature:

ERROR 2022-07-06T15:16:41.378 tokio-runtime-worker(ThreadId(1)) [1P:/Users/builder/builds/BhfSvM9x/0/dev/core/core/ssh/op-ssh-agent/src/lib.rs:160] Unable to start agent: Ipc(Io(Io { kind: InvalidInput, inner: "" }))
ERROR 2022-07-06T15:16:41.378 tokio-runtime-worker(ThreadId(1)) [1P:/Users/builder/builds/BhfSvM9x/0/dev/core/core/ssh/op-agent-controller/src/desktop.rs:328] Ipc(Io(Io { kind: InvalidInput, inner: "" }))
ERROR 2022-07-06T15:16:41.378 tokio-runtime-worker(ThreadId(1)) [1P:ssh/op-agent-controller/src/desktop.rs:334] SSH Agent failed to start

My ~/.ssh/config:

Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

Some other output:

ssh-add -l
The agent has no identities.

ls -l /Users//Library/Group\ Containers/2BUA8C4S2C.com.1password/t/

total 0
srw------- 1 staff 0 Jul 6 14:54 s.sock

I've been spending hours to find the solution, but can't find a fix.
Tried oa: rebooting, reinstalling 1Password, renaming > 2BUA8C4S2C.com.1password.old to reset 1password.

Any help appreciated :)


1Password Version: 8.8.0
Extension Version: 2.3.6
OS Version: 12.3
Browser:_ Safari

Comments

  • Ampned
    Ampned
    Community Member
    edited July 2022

    Maybe worth noting that all my SSH keys are in the 'Personal' keyvault (which is translated to 'Persoonlijk'?)

  • Could you send me the output of:

    echo ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock | wc -c
    
  • Ampned
    Ampned
    Community Member
    edited July 2022

    Sure!

  • floris_1P
    edited July 2022

    Ahh that explains it. It's very silly, but the reason this is happening is that the OS doesn't allow socket path lengths that long. We're working on finding an alternative there, but if you really want it to work now then you could consider changing your OS username or home dir to something shorter. That should fix it for now. We'll keep you posted here once we have a better solution. Apologies for the inconvenience.

  • Ampned
    Ampned
    Community Member

    Hey Floris, yeah company policy to have email addresses as OS username.
    Thanks for the heads up, I'll wait patiently :)

  • Sorry for the need to do that Ampned Hopefully, the team can find something that may help here. Thanks for being part of the family.

  • Ampned
    Ampned
    Community Member
    edited August 2022

    Hey guys, I've just had a similar problem when running Rancher Desktop. The bypass was to replace the directory with a symlink to a different location with a shorter path.

    Is that something that would be possible in this scenario as well?

    Link to the corresponding issue: https://github.com/rancher-sandbox/rancher-desktop/issues/797

  • Hi @Ampned! Symlinking does not seem to be a viable solution for this issue, but we're working on another fix for this problem. We'll keep you posted.

This discussion has been closed.