【问题标题】:How to use hg on Windows with SSH under bash/ubuntu?如何在 bash/ubuntu 下通过 SSH 在 Windows 上使用 hg?
【发布时间】:2018-03-10 03:41:08
【问题描述】:

我希望我可以把它放在我的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 pullhg clone 时,它只是挂起。有什么技巧可以让它工作,还是不允许做这样的跨操作系统的事情?

【问题讨论】:

    标签: windows bash ubuntu mercurial


    【解决方案1】:

    我猜它会提示输入用户信息。 (例如,您是否信任此主机指纹)

    创建一个run.bat 文件:

    bash -c "ssh %* 2>&1"
    

    并将其添加到 ssh 的 ini 文件中

    [ui]
    ssh = C:\somepath\run.bat
    

    现在当它挂在 hg clone 上时 - 执行 ctrl C,您应该会得到一些提示问题所在的文本。

    【讨论】:

      猜你喜欢
      • 2018-07-02
      • 2017-12-31
      • 1970-01-01
      • 1970-01-01
      • 2018-06-06
      • 2017-06-02
      • 2018-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多