【发布时间】:2014-07-07 12:43:52
【问题描述】:
我有一台托管存储库的 Windows 服务器计算机。我在其上创建了一个裸存储库,可通过以下命令使用文件协议访问该存储库。
git clone //my-server/git/test.git
这一切对我来说都很好,并且存储库在我的本地机器上成功克隆。
现在我必须通过 ssh 访问这个存储库。为此,我在服务器上安装了 Cygwin 并使用 ssh-host-config 命令配置了 ssh-host。我还在 /etc/passwd 中添加了一个本地 Windows 用户。
我可以使用 ssh 成功登录服务器,并从我的本地机器上玩服务器。
但是,我们尝试使用命令git clone ssh://my-server/git/test.git。我在命令提示符下看到以下错误。
fatal: '/git/test.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.
我什至尝试安装 Cygwin 的 Git,但这也无济于事。我不确定我到底哪里出错了。
【问题讨论】: