moul / assh

:computer: make your ssh client smarter
https://manfred.life/assh
MIT License
3.06k stars 156 forks source link

Can assh generate full assh binary path in ~/.ssh/config? #148

Closed evianzhow closed 7 years ago

evianzhow commented 8 years ago

I'm using SourceTree to manage my git repos which push and pull through SSH. After every config YAML changes, I re-generate with assh build > ~/.ssh/config. The last line ProxyCommand start with assh instead of the full assh binary path, and that cause SourceTree failed to find assh when doing network operations. I have to manually append the full prefix every time I re-genrate the config. I understand that it is caused by the alias, because SourceTree internally use ssh by default, but what if my GitLab machine is behind some relay node and want to access through assh? Also, this problem occurs when user choose a different install location instead of Homebrew's /usr/local/bin, and this may also brick SourceTree or any other apps. So I suggest that we could add a field which named like BIN_PATH to YAML config, and generate the full assh binary path instead of the barely assh one?

Give me a thumbs-up if you face the same pain :)

moul commented 8 years ago

👍 :)

Related with #143, #134

moul commented 8 years ago

You can now add this to your assh.yml file

hosts:
  blahblah:
    blah: blah

defaults:
  blah: blah

includes:
- ~/.ssh/blah.yml

ASSHBinaryPath: ~/mbin/assh  # full or relative path to the assh binary

This feature will be shipped with the next release, you can already try it by installing assh from GIT

evianzhow commented 7 years ago

@moul This might broken again in version: assh version 2.6.0 (HEAD)

When I do assh config build > ~/.ssh/config, I got ProxyCommand assh connect --port=%p %h on my config. Please take a look!

moul commented 7 years ago

@EvianZhow thanks for your feedback, I just pushed #246 which should fix this definitely :)

moul commented 7 years ago

@EvianZhow can you give a new try against the master branch of the repo?

evianzhow commented 7 years ago

@moul Work like a charm now. Thank you!