Forum Discussion

Anonymous's avatar
Anonymous
3 years ago

SSH Agent Error: "error: Error: AppError { error: could not authenticate with ssh agent ..."

Hi,

I've been using SSH agent in 1Password 8 for both signing my commits and for authentication (push/pull).

The past couple of days I've been having this issue on my intel mac where it would not authenticate with 1password.

This is the error

```
error: Error: AppError { error: could not authenticate with ssh agent, location: Location { file: "ssh/op-ssh-sign/src/ops.rs", line: 95, col: 37 } }

```

I tried it in multiple terminal emulators (iTerm, Alacritty, macOS Terminal).

The problem does not resolve when I restart my mac.

I tried enabling and disabling the SSH Agent but that didn't help. Would appreciate some help with this because it makes this feature unusable (I'm unable to make commits/push/pull).

30 Replies

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    Aha, that explains it. Properly handling these "partially locked" scenarios in the agent is something we're working on at the moment.

  • Anonymous's avatar
    Anonymous

    Multiple accounts with different passwords are indeed at play here.

    The account that has the key was actually locked, which did not occur to me at all. When it is unlocked, it seems to work just fine.

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    Do you have multiple accounts in 1Password that have different account passwords? If so, could you try locking 1Password and unlocking the account that has the key you've specified in your Gitconfig?

  • Anonymous's avatar
    Anonymous

    floris_1P I've sent my full diagnostics zip to mailto:support@1password.com with the subject:

    @Floris_1P: SSH Agent Error: "error: Error: AppError { error: could not authenticate with ssh agent ..."

  • Anonymous's avatar
    Anonymous

    I see this in the logs:
    WARN 2022-09-27T14:29:22.643 tokio-runtime-worker(ThreadId(4)) [1P:ssh/op-ssh-agent/src/lib.rs:428] failed to get private key from session

  • Anonymous's avatar
    Anonymous

    ~Any way I can deliver you the diagnostics zip file securely?~ See below

  • Anonymous's avatar
    Anonymous

    The problem manifested itself again for me, running the command above does show my keys but trying to make a git commit with the signing enabled will throw the same error

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    That is odd, does SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -l still work and also show your signing key?

  • Anonymous's avatar
    Anonymous

    Ok I worked around this by forcefully downgrading from the beta to production channel.

    I removed 1password 8 with CleanMyMac which sweeped up a lot of pref files, and then I also had to remove the whole container as described here https://1password.community/discussion/129617/update-from-beta-issues.

    After a re-install, I had a small issue with re-signing into the account when it offered it to me, so I just removed and re-added the offending one.

  • Anonymous's avatar
    Anonymous

    Same as above, with the same line:col reference