有关Copssh问题的Windows和ssh配置上的Mercurial

时间:2010-02-02 22:20:13

标签: mercurial ssh

我已经在Windows 2008服务器上安装了copssh,然后我尝试通过ssh克隆服务器上的重定位。但无论我怎么努力,我都无法解决这个错误。这是日志:

C:\Users\Admin>hg clone ssh://ehsan@rafsanjani.ir
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
ehsan@rafsanjani.ir'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://administrator@rafsanjani.ir
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
administrator@rafsanjani.ir'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!

1 个答案:

答案 0 :(得分:0)

最新版本的copssh / cwrsync使用cygwin 1.7并需要一个HOME环境变量。所以只需添加一个HOME =%HOMEDRIVE %% HOMEPATH%变量,它就可以立即生效。它为我做了:))