如何在Windows上通过bash/ubuntu下的SSH使用hg?
我希望我能把这个放到我的如何在Windows上通过bash/ubuntu下的SSH使用hg?,windows,bash,ubuntu,mercurial,Windows,Bash,Ubuntu,Mercurial,我希望我能把这个放到我的mercurial.ini: [ui] ssh = C:\Windows\System32\bash.exe -c ssh 由于C:\Windows\System32\bash.exe-C ssh看起来像在工作: C:\Users\mpen>C:\Windows\System32\bash.exe -c ssh usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
mercurial.ini
:
[ui]
ssh = C:\Windows\System32\bash.exe -c ssh
由于C:\Windows\System32\bash.exe-C ssh
看起来像在工作:
C:\Users\mpen>C:\Windows\System32\bash.exe -c ssh
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file] [-L address]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q query_option] [-R address] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] [user@]hostname [command]
但是当我
hg pull
或hg clone
时,它就挂起了。是有什么诀窍可以让它发挥作用,还是不允许我做这种跨操作系统的事情?我猜它会提示用户信息。(例如,您信任此主机指纹吗)
创建run.bat
文件:
bash -c "ssh %* 2>&1"
并将其添加到ssh的ini文件中
[ui]
ssh = C:\somepath\run.bat
现在,当它挂在hg clone上时,执行ctrl-C,您应该会得到一些文本,提示问题所在