gpt4 book ai didi

windows - "invalid command syntax"hg 使用 .ppk key 克隆 ssh 窗口

转载 作者:可可西里 更新时间:2023-11-01 10:34:03 26 4
gpt4 key购买 nike

我正在尝试使用身份验证 key (.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

希望这可以帮助遇到问题的其他人^^

关于windows - "invalid command syntax"hg 使用 .ppk key 克隆 ssh 窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37444141/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com