SSH not using 1Password Agent unless SSH_AUTH_SOCK set

Lucky38i
Lucky38i
Community Member

So I've been trying to use SSH Keys via 1password as opposed to having them physically on my device.

I've gone through the process of setting up all of this in accordance to the documentation. From my understanding, there's 3 options for this to work, IdentityAgent, IdentityFile or SSH_AUTH_SOCK, and each option can work independently.

So in my case I've opted for IdentityAgent with my ~/.ssh/config looking like so

Host work-github
    HostName github.com
    User git
    IdentityAgent "~/Library/Group Containers/<random alphanumeric>.com.1password/t/agent.sock"
    IdentityFile none

My SSH Keys is stored in a folder called Work and so accordingly I'm modified the agent toml appropriately.

[[ssh-keys]]
item = "M2 SSH Key"
vault = "Work"

Also, I've made sure to add my public key to Github as the guide instructs.

Now whenever I attempt to clone, push etc. Nothing works I'm given the following error


Running ssh -vT git@github.com notably shows:

debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities

Which perplexes me even further.

In order to get this to work, I need to set the environment variable SSH_AUTH_SOCK, every-time I'm in a new terminal instance.

Is there something I'm misunderstanding about how this all works, cause I thought setting IdentityAgent would be good enough. Any ideas?


1Password Version: 8.10.9 (81009046)
Extension Version: Not Provided
OS Version: 13.5.1 (22G90)
Browser: Not Provided

Comments

This discussion has been closed.