Windows 上的 Mercurial 和 ssh 配置存在 Copssh 问题

发布于 2024-08-19 21:44:12 字数 2017 浏览 1 评论 0原文

我在 Windows 2008 服务器上安装了 copssh,然后尝试通过 ssh 在服务器上克隆存储库。但无论我如何努力,我都无法修复这个错误。这是日志:

C:\Users\Admin>hg clone ssh://[email protected]
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: /bin/bash: Permission denied
abort: no suitable response from remote hg!

我尝试使用管理员登录,但收到相同的错误消息。此外,我还更改了位于 C:\Program Files (x86)\ICW\home\administrator 中的文件夹的权限,以便 ehsan 具有对此文件夹的完全访问权限。

另外,当我使用 putty 连接到服务器并使用此命令时:

cd /home/administrator/.ssh 
echo test>test

文件测试将创建!看来我有这个文件夹的权限!

这是我尝试使用管理员帐户克隆时的日志:

C:\Users\Admin>hg clone ssh://[email protected]
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: bash: hg: command not found
abort: no suitable response from remote hg!

I've installed the copssh on a windows 2008 server and then I tried to clone a reposity on the server through ssh. But no matter how hard I tried I couldn't fix this error i got. here is the log:

C:\Users\Admin>hg clone ssh://[email protected]
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: /bin/bash: Permission denied
abort: no suitable response from remote hg!

I tried to login with administrator but i get the same error message. Also i changed the permission of the folder located in C:\Program Files (x86)\ICW\home\administrator so that ehsan has the full access to this folder.

also when I connect to the server with putty and use this command:

cd /home/administrator/.ssh 
echo test>test

file test will create! so it seems that I have the permission to this folder!

this is log when i try to clone with administrator account:

C:\Users\Admin>hg clone ssh://[email protected]
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: bash: hg: command not found
abort: no suitable response from remote hg!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初雪 2024-08-26 21:44:13

最新版本的 copssh/cwrsync 使用 cygwin 1.7 并需要 HOME 环境变量。因此,只需添加 HOME=%HOMEDRIVE%%HOMEPATH% 变量,它就应该立即起作用。它对我有用:)

The latest versions of copssh/cwrsync use cygwin 1.7 and require a HOME environment variable. So just add a HOME=%HOMEDRIVE%%HOMEPATH% variable and it should work right away. It did for me :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文