Forum Discussion

Former Member's avatar
Former Member
4 years ago

1Password SSH Agent Multiple Keys

Hello!

I have two vaults (1 work and 1 personal) and within each i have a SSH Key generated and stored by 1Password (Private vault for work and Personal vault for personal)

Both have been added to two separate GitHub accounts (work and private) and i am able to git pull for repo's in both of these accounts, however i can only git push to my work account and when i try and do a git push for personal repo's i get

```
ERROR: Permission to medoix/repo-name.git denied to work-username.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```
Any suggestions on how to troubleshoot why its only using the single key when trying to push?


1Password Version: 8.7.0
Extension Version: Not Provided
OS Version: Linux (Arch)

5 Replies

  • mpepping's avatar
    mpepping
    Occasional Contributor

    Running GIT_SSH_COMMAND="ssh -v" git pull shows which keys are offered and which one is used, during a git pull.

  • Former Member's avatar
    Former Member

    Response was that this is not supported. I believe it is due to a limitation in the way SSH looks up the fingerprint of a specific domain in known_hosts and uses the key associated. I had to revert back to using my SSH config and custom domains for each SSH key.

    Would be great if they found a way around this so we could store all keys in 1Password.

  • Former Member's avatar
    Former Member

    Jack_P_1P
    @medoix

    Facing the same issue.
    Can you share how it went please?

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

    Hey @medoix:

    It looks like you've emailed us about this as well, and one of my colleagues has just gotten back to your email. Please check your inbox!

    Jack

  • Former Member's avatar
    Former Member

    If i archive the SSH key within my work vault the git push works immediately so it appears the SSH agent is only trying the one key and failing. Is this expected?