maxgoedjen / secretive

Store SSH keys in the Secure Enclave
MIT License
7.16k stars 157 forks source link

Security improvement: support for Keys Routing [ SOLVED ] #460

Open ink-splatters opened 1 year ago

ink-splatters commented 1 year ago

Cannot use 2 different keys from Secretive, in the way described below

The issue is SOLVED, @maxgoedjen please mark accordingly if you agree.

The culprits were

  1. related issue: https://github.com/maxgoedjen/secretive/issues/440
  2. IdentitiesOnly Yes is mandatory

My current config

% cat ~/.ssh/config 
Host *
    IdentityAgent /home/ic/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
    IdentityFile /home/ic/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/cedc8d35d8e6a2bcf6386415ee8a5acc.pub

Host myorg.github.com
    HostName github.com
    IdentitiesOnly yes
    IdentityAgent /home/ic/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
    IdentityFile /home/ic/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/970808bd9e0cb7ecdcdffb791cf6624e.pub

now those both work:

git clone git@github.com:ink-splatters/lib.sh.git
git clone git@myorg.github.com/my-org-repo.git

Hope it helps someone

@maxgoedjen There should be also duplicate issue: https://github.com/maxgoedjen/secretive/issues/156 which seems like solvable the same way, please confirm