Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
1pjunkie
8 months agoNew Contributor
Give preference to 1p ssh key defined in git config
Hello.
I have multiple github accounts that I need to use at the same time. All my ssh keys are stored in 1p. what I need is when operating under one git repo, to always use the preferred GithubAu...
Michael_Mercuri
8 months agoFrequent Contributor
what i'm finding is that even if i have an identity file defined in the gitconfig, 1p still goes through the list of ssh keys defined in my ssh vault and doesn't give preference to the one defined in the gitconfig.
When you configure the identity file, you should be able to specify the public SSH key to use, with the private key stored in 1Password. In this case, when the identify file is used for SSH access, only that key will be attempted.
In order to get this behavior to work you may also need to specify the IdentitiesOnly
option in ~/.ssh/config
.