Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
3 years agoError connecting to agent: No such file or directory
I just saw the post & beta for SSH + CLI integration and this seems amazing. +1 Cant wait for the final release.
However, I'm unable to get this working at all.
* I also use a shell called fishshell
for what it's worth. (fish, version 3.3.1, but I do not believe this is part of the issue, as I swapped to bash too, and experience the same issue)
* I have installed OpenSSH (OpenSSH_8.6p1)
* 1P CLI is on version 2.0.0
I've run both the "configuration" commands per the docs.
I've created the symlink using
mkdir -p ~/.1password && ln -s ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ~/.1password/agent.sock
...and added the additional line to the ssh config
Host *
IdentityAgent "~/.1password/agent.sock"
IdentitiesOnly yes
I also added the SSH_AUTH_SOCK
to my profile, even tried the global config from here
I've check that I have all the requirements.
* Private vault
* New Key generated via 1Password
* Not archived
But when I run
ssh-add -l
I keep getting a response of Error connecting to agent: No such file or directory
, and also any github cli interactions refuses to connect, but I believe its all caused by one in the same issue
Any ideas of what I might be missing?
1Password Version: 8.6.0
Extension Version: Not Provided
OS Version: 12.2.1 (21D62)
Referrer: forum-search:ssh
- floris_1P
1Password Team
Glad you got it working! The docs have been updated now to mention both the
Private
andPersonal
vault. - Former Member
And solved it! 🥳
Use this match key with host setup
- Former Member
And I think in all of the moving backwards & forwards I might have not put the ssh keys in the right vault.
I did verify it again now, and they keys are in the right vault. (I have 2 SSH keys... But I see that also causes an issue, because I don't know how to specify with 1Password to use which hey for which gh account, so for now, I'm just using the one)
I have 2 MacBooks, a personal one, and one for work.
My personal machine:
* Worked fine. Did the upgrade to 1Password 8 (App + Browser Plugin).
* SSH sees my keys + I can login to githubWork machine:
```
~/.ssh ssh-add -lfinally returns the key that is inside the vault! 🥳
~/.ssh ssh -T git@github.com
fails
~/.ssh ssh -o 'IdentitiesOnly=no' -T git@github.com
succeeds! 🥳
```
I then removed the IdentiesOnly flag from my
.ssh/config
and I can now login to gh using the SSH key stored in 1 Password.This is probably a question for another thread.
But is there a way to specify which key to use for which gh repo?
```
Host *
IgnoreUnknown UseKeychain
AddKeysToAgent yes
UseKeychain yes
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"Host smg.github.com
HostName github.com
User git
IdentityFile ~/.ssh/rohan_smg_generated. # I would like to move this to 1Password tooHost github.com
HostName github.com
User git
``` - Former Member
All of this is on my local dev machine. 1P + SSH etc
I mean... I could try physically restarting it... Which I haven't actually thought of doing yet 😂[Update]
My Mac & 1Password has been Restarted & unlocked. No luck. - floris_1P
1Password Team
And another question, just to verify: when you moved the keys to your
Personal
vault, was that on the same machine where you're running the SSH agent on? Because for the SSH agent to sync your change, it needs to be unlocked once first. - Former Member
I assume you meant the SSH agent. So I did toggle that.
- I cleared the logs (made a backup first)
- Toggled both SSH + CLI
There are 2 errors below: (included the into logs too fwiw)
```
INFO 2022-03-18T12:49:49.842 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:299] Setting has been toggled on/off, restarting native core integration
INFO 2022-03-18T12:49:49.842 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:281] Starting IPC listener on 2BUA8C4S2C.com.1password.browser-helper
INFO 2022-03-18T12:49:49.842 tokio-runtime-worker(ThreadId(4)) [1P:op-ipc/src/ipc/xpc.rs:155] XPC starting connectionERROR 2022-03-18T12:49:49.843 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:37] Dropping connection with b5x due to error handling outgoing message: EndConnection
INFO 2022-03-18T12:49:49.864 tokio-runtime-worker(ThreadId(10)) [1P:op-ipc/src/ipc/xpc.rs:197] XPC connected to 2BUA8C4S2C.com.1password.browser-helper
INFO 2022-03-18T12:49:49.864 tokio-runtime-worker(ThreadId(10)) [1P:native-messaging/op-native-core-integration/src/lib.rs:293] Active native core integration is awaiting messages
INFO 2022-03-18T12:49:49.864 tokio-runtime-worker(ThreadId(10)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO 2022-03-18T12:49:49.864 tokio-runtime-worker(ThreadId(10)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
INFO 2022-03-18T12:49:58.267 tokio-runtime-worker(ThreadId(6)) [1P:ssh/op-agent-controller/src/desktop.rs:285] SSH Agent has started.
INFO 2022-03-18T12:50:00.319 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/lib.rs:448] Enabling BrowserHelper with bundle id: 2BUA8C4S2C.com.1password.browser-helper
INFO 2022-03-18T12:50:00.325 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/lib.rs:299] Setting has been toggled on/off, restarting native core integration
INFO 2022-03-18T12:50:00.325 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/lib.rs:281] Starting IPC listener on 2BUA8C4S2C.com.1password.browser-helper
INFO 2022-03-18T12:50:00.325 tokio-runtime-worker(ThreadId(7)) [1P:op-ipc/src/ipc/xpc.rs:155] XPC starting connectionERROR 2022-03-18T12:50:00.325 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:37] Dropping connection with b5x due to error handling outgoing message: EndConnection
INFO 2022-03-18T12:50:00.342 tokio-runtime-worker(ThreadId(6)) [1P:op-ipc/src/ipc/xpc.rs:197] XPC connected to 2BUA8C4S2C.com.1password.browser-helper
INFO 2022-03-18T12:50:00.342 tokio-runtime-worker(ThreadId(6)) [1P:native-messaging/op-native-core-integration/src/lib.rs:293] Active native core integration is awaiting messages
INFO 2022-03-18T12:50:00.342 tokio-runtime-worker(ThreadId(6)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO 2022-03-18T12:50:00.342 tokio-runtime-worker(ThreadId(6)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.```
- floris_1P
1Password Team
Hmm, could you turn the agent off and on the 1Password settings and see if there's anything in the logs?
- Former Member
Its
0
- floris_1P
1Password Team
Could you share the output of:
sqlite3 ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/Library/Application\ Support/1Password/Data/1password.sqlite 'select count(*) from objects where type = 3'
- Former Member
No success, unfortunately. (With the Keys in the Personal Vault)
```
~/.ssh ssh-add -l
The agent has no identities~/.ssh ssh -o 'IdentitiesOnly=no' -T git@github.com
git@github.com: Permission denied (publickey).
```