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 agoSSH 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).
- Former Member
I had this to on Windows, exact same error message and "session was not authorized" in the logs. However I figured out the cause in my case. I was using Remote Desktop to connect to the machine. And if I use the computer directly it works just fine.
It seems to me Windows disables Windows Hello when connecting through a remote session and I guess 1Password fails to invoke authentication with Windows Hello which if I've understood it correctly this feature relies upon.
(At first glanse it might make sense to disable Windows Hello due to the biometric features however PIN would still work in a remote session in my opinion but that is a topic for Microsoft i guess)
I do realize that this is probably a limitation in Windows/Windows Hello but might I suggest that the op-ssh-agent.exe could verify if Windows Hello is available and if not throw a suitable error message?
Just trowing this out there as a possible cause if anyone else experiences this on Windows as well :)
- Former Member
floris_1P I'm getting the exact same issue that was reported by @uws
The command:
SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -L | grep "$(git config user.signingkey)"
is returning the correct key.The console shows the following error when trying to commit:
```
$ git commit -S -m 'test message'
error: Error: AppError { error: could not authenticate with ssh agent, location: Location { file: "ssh/op-ssh-sign/src/ops.rs", line: 95, col: 37 } }fatal: failed to write commit object
```The log file
1Password_rCURRENT.log
shows the following when it fails:
INFO 2022-10-21T12:33:53.140 tokio-runtime-worker(ThreadId(277)) [1P:foundation/op-apple/src/biometry_service.rs:287] System biometry info: BiometricStatus { current_policy: WatchOnly, current_method: TouchId, current_availability: Available }
INFO 2022-10-21T12:33:53.147 tokio-runtime-worker(ThreadId(277)) [1P:foundation/op-apple/src/biometry_service.rs:287] System biometry info: BiometricStatus { current_policy: WatchOnly, current_method: TouchId, current_availability: Available }
ERROR 2022-10-21T12:33:53.149 tokio-runtime-worker(ThreadId(5)) [1P:op-automated-unlock/src/lib.rs:294] Failed to authorize using system biometry: FailedToUnlockWithKeys(BiometryUnavailable)
INFO 2022-10-21T12:33:53.149 tokio-runtime-worker(ThreadId(5)) [1P:ssh/op-ssh-agent/src/lib.rs:419] Session was not authorized
- Former Member
floris_1P – thanks for your reply.
This returns nothing:
```
SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -L | grep "$(git config user.signingkey)"```
This returns:
zsh: no such file or directory: /path/to/dir~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs/1Password_rCURRENT.log
- floris_1P
1Password Team
@uws Does this command return your signing key?
SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -L | grep "$(git config user.signingkey)"
If so, does anything appear in the 1Password logs when a commit fails? On macOS:
~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs/1Password_rCURRENT.log
- Former Member
Hi floris_1P – I am having the same issue as @ghosts. My intention is to simply use SSH for git (initially for one git user, and then later to add another). For now, I can't seem to get just one setup.
Some knowns:
- 1P is setup with two Organization accounts, one of which I am a member of, and another I am the owner of.
- The key/signing in question are stored in a Private folder in the later (account that I own)
- I am signed into both accounts on Mac M1 Desktop App
Here are some relevant outputs if helpful:
$ SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -l
256 SHA256:-----KAKmM Github Access (ED25519)
256 SHA256:-----jNFvQ Github Signing (ED25519)
$ git config user.signingkey
```
ssh-ed25519 -----WOWk0```
$ssh-add -LThe agent has no identities.
$ .ssh % cat config
```
Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"```
I'm happy to share known_hosts, known_hosts.old and id.rsa if needed as well.And same as @ghosts, I am encountering the same issue:
```
error: Error: AppError { error: could not authenticate with ssh agent, location: Location { file: "ssh/op-ssh-sign/src/ops.rs", line: 95, col: 37 } }fatal: failed to write commit object
```Would love some help as when you google this only one result (this community page) appears.
Thanks in advance!
Jacob - floris_1P
1Password Team
If you still get the error on your work computer, could you see if there's anything in the 1Password logs when you run a failing command? Logs on macOS are here:
~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs/1Password_rCURRENT.log
- Former Member
floris_1P yes the output of those two commands contains the same key.
Weirdly enough it's working correctly again on my personal computer, all without any change or even restart on my part.
but started having this same error on my M1 work computer. Not sure what to think of this 🤔I'll try running those commands again on my work computer tomorrow and report back
- floris_1P
1Password Team
Can you run this command from your repo directory:
git config user.signingkey
And confirm that that key is present in yourssh-add -L
output? - Former Member
My version:
1Password for Mac 8.9.4, 80904044, on PRODUCTION channel
Has 1 account onlyMy mac info:
macOS Monterey 12.6 (21G115) (Intel)The command does seem to list my keys:
But commits/push/pull are still failing
This issue is not present on my work computer (M1 mac laptop, running the same version of 1Password, with 2 accounts)
- Former Member
Good to know, thanks! I hope I didn't hijack @ghosts ' original issue though, it's possible they were experiencing the issue due to something else?