milke / GitFinder-Issues

Bug and issue tracker for GitFinder - git client with macOS Finder integration
16 stars 1 forks source link

1Password integration #125

Open ErikMeinders opened 8 months ago

ErikMeinders commented 8 months ago

Your software seems an excellent for my workflow. However, I keep my passwords as well as SSH keys in 1Password. When using your software I have to select my ssh private key file. Guess what, I don't have a private key file anymore, it's in 1Password. Any plans to make GitFinder use keys from an other source than a file?

milke commented 8 months ago

To put things simply, the only way to authenticate an SSH connection is to use a private key stored in a file and implement own authentication workflow, or to use ssh-agent to do the job (actually letting ssh-agent to use private key(s) in file(s) configured in its configuration file ~/.ssh/config).

I looked into the "SSH keys in 1Password" documentation. 1Password (as of recently) has an SSH agent component, which keeps your private and public keys into a secure enclave. But (as far as I understand) for git purposes it's used through standard ssh-agent by adding

IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

into the configuration file ~/.ssh/config. That means keys kept in 1Password enclave are available to ssh-agent.

However, being the sandboxed application, GitFinder can't work with ssh-agent directly. That implies it can't work with keys kept in 1Password as well 🙁

I'll contact 1Password guys and check with them if there's some other way (programmatically) to access keys kept in 1Password. I will also review the authentication code and see if I can make GitFinder work with ssh-agent despite being sandboxed (when I created GitFinder I didn't look much into this, as it wasn't possible in a straightforward fashion, and I actually never returned to it afterwards).

In the meanwhile, if you want to use GitFinder, I'm afraid your only option is to export your private SSH key into a file and then point GitFinder onto that file to use for SSH authentication (assuming 1Password enables such export action).

I'm sorry I can't provide more satisfactory solution at the moment.