Mac not picking up on ssh settings to use 1P

gewoonseba
gewoonseba
Community Member

I'm trying to setup the SSH capabilites of 1P but am stuck in trying to get my mac to always use 1p for ssh.

I've added this code to my ssh config
Host * IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

But when I run ssh-add -l I don't get the correct ssh keys.

When I run SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -l I do get the correct ssh keys in both my vaults.

Exporting the SSH_AUTH_SOCK in my .zshrc file makes sure that ssh-add -l returns the key I expect, but when I then then try and clone a repo, 1p is not triggered and I'm not authorized to cole the repo


1Password Version: 1Password for Mac 8.10.44 (81044034)
Extension Version: Not Provided
OS Version: macOS 15.0 (24A335)
Browser: Not Provided

Comments

  • Michael Mercurio
    Michael Mercurio
    Community Member

    Regarding needing to update SSH_AUTH_SOCK to work with ssh-add, that's how ssh-add and SSH agents in general are supposed to work. ssh-add does not use the ssh config file (~/.ssh/config).

    I'm not sure what could be causing this:

    but when I then then try and clone a repo, 1p is not triggered and I'm not authorized to cole the repo

    Can you provide an example command you're running to clone a repo?

    If you're using git clone, are you providing an ssh URL such as git@github.com:<user>/<repo>.git? You may also need to add an entry for the git user in your ~/.ssh/config like this (for GitHub):

    Host github.com
        HostName github.com
        User git