Mercurial over ssh client and server on Windows

后端 未结 6 1933
挽巷
挽巷 2021-02-01 21:50

I\'m trying to configure Mercurial for use with both a windows server (freeSSHd) and client (both command line and TortoiseHG). I\'m using the most recent versions of everythin

6条回答
  •  失恋的感觉
    2021-02-01 22:22

    I got the same symptoms just now, although hg was a bit more helpful after Ctrl+C - apparently plink was waiting for me to say y/n to "save server to cache". Unfortunately hg couldn't pass my y/n to it interactively (nor tell me that plink printed something important...)

    Solution:

    1. plink to the host once and save server info to cache
    2. add -batch to the plink command line so that next time this happens it aborts instead.

    I also add my key to pageant so I don't need to type the password anywhere else.

    Complete example of .hgrc file (Win+R, notepad %USERPROFILE%\.hgrc):

    [ui]
    ssh=C:\Path\To\plink.exe -C -batch -ssh -i C:\Path\To\My\putty-private-ssh-key.ppk
    

提交回复
热议问题