1Password Github setup
1Password Git setup
**Not really a 1password thing, but 1password can do lookups in the vault, though sequentially throughout all keys which might timeout before it gets to the one you want. **
SSH keys with multiple repositories and accounts
Notice! The official docs are incorrect, they state that you should download the Public key from your vault to use multiple Github accounts https://developer.1password.com/docs/ssh/agent/advanced but you should instead download the privatekey. (Since you cant authenticate your public key with the public key in your github account)
Download each private key file to
~/.ssh
and rename appropriately. Named minework_git.key
andpersonal_git.key
edit OR create
~/.ssh/config
This will setup
HostName
for which we will need later
User
is always git
for Github SSH keys
IdentityFile
the identityFile, the private key
In each repository you have, check which remote you have. For the repo behind this wiki, I have
Change this to the new "host"
where personalgit
comes from the HostName in the config file
Checking the remote now shows
Test to pull and it should work.
Clone a new repo using the key
Or
And it should clone without any issues and then you can set the remote with
Last updated