SSH服务器是否需要在远程客户端的unix样式环境中运行才能使GIT克隆正常工作?

时间:2017-07-20 19:16:59

标签: windows git ssh openssh

我的任务是为我的团队在内部设立一个GIT中央回购。

我正致力于在Windows Server 2012 R2计算机上进行此设置。据我所知,我已经正确设置了这个。

我一直关注this tutorial,但他们使用的CopSSH已经不再免费了,所以我在这里安装了Windows OpenSSH:Install-Win32-OpenSSH

在我们的Windows服务器上,我已经安装并配置了Windows OpenSSH和GIT。对环境变量和所需参考进行了适当的更改。

在我的本地系统(也是Windows)上,我已经安装了Putty并生成了我的公钥和私钥。公钥已复制到服务器并放在正确的文件中。使用putty,我已经验证了我的公钥/私钥认证是否有效。

在服务器上,我在C:驱动器中创建了一个git裸存储库,如下所示:

cd C:\
mkdir testing.git
git init --bare testing.git

我在本地计算机上安装了GIT并运行命令:

git clone ssh://name@host:port/testing.git

我总是以输出结束:

Cloning into 'testing'...
fatal: ''/testing.git'' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我尝试使用相同结果尝试此命令的不同变体,并将testing.git文件移动到用户主目录(C:\ Users \ name):

git clone ssh://name@host:port/c/testing.git
git clone ssh://name@host:port/~/testing.git

我已经删除了明确授予此用户访问该目录的权限的权限。

好像git clone命令可能找不到远程服务器上的文件夹。我开始认为SSH服务器本身需要在像cygwin这样的unix环境中运行。这是我的问题吗?我已经看过使用openssh安装cygwin的教程/演练,这将是我的下一次尝试。

感谢您的帮助!

修改 所以我继续安装Bitvise进行30天的试用(尝试),一切正常,但这只是30天。那么这必然意味着我的Windows OpenSSH存在一些设置问题吗?

0 个答案:

没有答案