1Password SSH Agent Multiple Keys

medoix
medoix
Community Member
edited June 2022 in SSH

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)

Comments

  • medoix
    medoix
    Community 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?

  • 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

  • TheAutomaticNinja
    TheAutomaticNinja
    Community Member

    @Jack.P_1P
    @medoix
    Facing the same issue.
    Can you share how it went please?

  • medoix
    medoix
    Community 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.

  • mpepping
    mpepping
    Community Member

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

This discussion has been closed.