How to use TortoiseHg from command line without PuTTY (Pageant)
之前我使用
在我的新笔记本电脑上,我安装了
Disconnected: No supported authentication methods available (server sent: publickey)
如果我尝试直接通过ssh访问存储库,则会得到类似的结果:
可以使用
但是,我正在寻找如何仅使用默认的ssh密钥位置以旧的方式工作,而没有页面或链接的问题?
看起来与
使用TortoisePlink作为ssh客户端,并在Mercurial配置(%USERPROFILE%\。hgrc或%USERPROFILE%\ Mercurial.ini)中使用显式键引用:
[ui]
ssh ="C:\\Program Files\\TortoiseHg\\lib\\TortoisePlink.exe" -ssh -i %USERPROFILE%.ssh\\id_rsa.ppk
如果已安装
[ui]
ssh ="C:\\Program Files (x86)\\Git\\bin\\ssh.exe"
# or
# ssh ="PATH_TO_ANY_OTHER_SSH_CLIENT_LIKE_CYGWIN"
我尝试了两种方式-它们效果很好。
我使用第二个,因为我在PC上使用
笔记:
- 有时,基于解析器,ini文件中的路径用字符转义了,因此\可能会转义下一个符号。在这种情况下,路径应类似于C:\\ Program Files(x86)\\ Git \\ bin \\ ssh.exe(带有双斜杠)
-
我在%PATH%变量中有git \ bin目录,以使用
ssh 而不指定完整路径。在这种情况下,您可以在Mercurial配置中使用以下命令:[ui]
ssh = ssh
不,除了TortoiseHg本身以外,没有安装或使用某些软件就没有任何办法。
Mercurial本身不实现SSH。在Unix上,它仅运行
SSH is a symmetrical peer-to-peer secure tunnel. SSH clients and servers have their own key management systems, so Mercurial does not get involved with password prompts when SSH is used. This is problematic on Windows and thus TortoiseHg bundles the TortoisePlink SSH client with its Windows installers. TortoisePlink is a port of the Plink SSH client that uses dialog prompts for host-key authorizations and passphrase prompts. TortoisePlink (developed by the TortoiseSVN project) can use the other SSH tools that are part of the Plink toolchain, including the Pageant key agent.
如果您不使用TortoisePlink,则很可能没有TortoiseHg可以与其连接的SSH客户端。而且,如果您不使用Pageant,那么将没有保存密钥的系统。 TortoisePlink不使用
使用TortoiseHg时,如何防止出现"没有可用的支持的身份验证方法"错误?
获取/运行puttygen.exe,在关闭窗口之前,单击"生成"(无密码),然后单击"保存pubkey","保存PrivKey"。复制所有关键文本,(或者您必须返回到puttygen)并将其粘贴到BitBucket网页上的Account / Profile / Settings / Security / SSHKeys区域。
(右键单击)systray中的pageant.exe图标-单击"添加密钥"。
退出选美并重新加载它以确保。退出乌龟并重新加载它以确保。好去。