“无效的命令语法”使用.ppk键克隆ssh窗口

我试图克隆使用身份validation密钥(.ppk文件)在Windows平台上的bitbucket存储库。 我知道连接到服务器是好的,因为我有“服务器拒绝连接”错误之前,但现在我得到一个“无效的命令语法错误”

这是我正在使用的命令(我用–debug标签运行“hg clone”命令来获得完整的命令):

running "C:\Program Files/TortoiseHg/lib/tortoiseplink.exe" -ssh -v -i "C:\Users \user\key.ppk" -noagent hg@bitbucket.org hg@bitbucket.org "hg -R repo/path serve --stdio" 

这是我从这个命令得到的输出:

 running "C:\Program Files/TortoiseHg/lib/tortoiseplink.exe" -ssh -v -i "C:\Users \user\key.ppk" -noagent hg@bitbucket.org hg@bitbucket.org "hg -R repo/path serve --stdio" sending hello command sending between command remote: Looking up host "bitbucket.org" remote: Connecting to 104.xxx.xxx.1 port 22 remote: Server version: SSH-2.0-OpenSSH_5.3 remote: Using SSH protocol version 2 remote: We claim version: SSH-2.0-PuTTY_Local:_Feb__4_2012_13:00:34 remote: Doing Diffie-Hellman group exchange remote: Doing Diffie-Hellman key exchange with hash SHA-256 remote: Host key fingerprint is: remote: ssh-rsa 2048 97:8c:xx:xx:xx:14:6b:5c:3b:ec:aa:46:46:74:7c:40 remote: Initialised AES-256 SDCTR client->server encryption remote: Initialised HMAC-SHA1 client->server MAC algorithm remote: Initialised AES-256 SDCTR server->client encryption remote: Initialised HMAC-SHA1 server->client MAC algorithm remote: Reading private key file "C:\Users\user\key.ppk" remote: Using username "hg". remote: Offered public key remote: Remote debug message: Forced command: conq username:user remote: Remote debug message: Port forwarding disabled. remote: Remote debug message: X11 forwarding disabled. remote: Remote debug message: Agent forwarding disabled. remote: Remote debug message: Pty allocation disabled. remote: Offer of public key accepted remote: Authenticating with public key "rsa-key-20160523" remote: Sent public key signature remote: Remote debug message: Forced command: conq username:user remote: Remote debug message: Port forwarding disabled. remote: Remote debug message: X11 forwarding disabled. remote: Remote debug message: Agent forwarding disabled. remote: Remote debug message: Pty allocation disabled. remote: Access granted remote: Opened channel for session remote: Started a shell/command remote: Server sent command exit status 1 remote: Disconnected: All channels closed remote: conq: invalid command syntax. hg : abort: no suitable response from remote hg! 

如果任何人可以提供一些援助,将不胜感激。

修复。

错误在我的电话里

“hg @ bitbucket”应该只在一次调用中…

 running "C:\Program Files/TortoiseHg/lib/tortoiseplink.exe" -ssh -v -i "C:\Users \user\key.ppk" -noagent hg@bitbucket.org "hg -R repo/path serve --stdio" 

我在mercurial.ini文件中重新映射了ssh,如下所示:

 ssh = "C:\Program Files/TortoiseHg/lib/tortoiseplink.exe" -ssh -v -i "C:\Users\user\key.ppk" -noagent hg@bitbucket.org 

但应该是:

 ssh = "C:\Program Files/TortoiseHg/lib/tortoiseplink.exe" -ssh -v -i "C:\Users\user\key.ppk" -noagent 

希望这可以帮助别人有问题^^

你也可以看到线条

 remote: conq: invalid command syntax. abort: no suitable response from remote hg! 

如果你不小心在你的命令中粘贴了特殊字符。 这发生在我粘贴了线

 hg clone ssh://hg@bitbucket.org/your/repo . 

从一篇wiki文章中。 clonessh之间的空间和最后的时期都造成了这个问题。 这是一个不幸的假设/令人头痛的事情。 一切手工输入是我的建议,任何人看到这个错误只是一个健全的检查。