- Edit
~/.ssh/config
- Add an item for each SSH identity/key following this example (replace github with appropriate name):
Host github
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_github.pub
IdentitiesOnly yes
- Open SSH identity on 1password.
- Over cursor on the
public key
field, click on the chevron-down icon and click onDownload
. - Save
.pub
file in the location specified in the git config file.
- When accessing the git repository, replace the hostname (e.g., github.com) with the host value define (e.g., github).
- Example:
[email protected]:andreibosco/example.git
becomesgithub.com:andreibosco/example.git
- The identity/key must have been configured on 1Password to be used with its SSH agent.
- To do so, go to the SSH identity on 1password.
- Click on the
...
button next toEdit
, and click onConfigure for SSH agent
. - Follow the instructions on the file to add the desired identity/key.