【问题标题】:Cloning git repository from Windows with CopSSH and MSysGit使用 CopSSH 和 MSysGit 从 Windows 克隆 git 存储库
【发布时间】:2014-04-01 18:52:35
【问题描述】:

我在运行 Windows 2003 Server 的计算机上设置 Git 服务器时遇到问题。

我在服务器上安装了 CopSSH,并且可以通过 SSH 成功连接到服务器。然后,我在服务器上安装了 MSysGit(只是编译的可执行文件)。最后,我在 CopSSH Bash shell 中使用 ln -s 在 CopSSH 的 bin 目录中创建指向 Git 可执行文件(来自 MSysGit 的 bin)的链接。

我可以成功连接到服务器并通过 SSH 使用 Git:

$ ssh git@<server>
git@<server>'s password:
Last login: Sun Dec   4 10:10:08 from <computer>

git@<server> ~
$ cd /cygdrive/c/gitRepos/

git@<server> /cygdrive/c/gitRepos/
$ mkdir test.git

git@<server> /cygdrive/c/gitRepos/
$ cd test.git

git@<server> /cygdrive/c/gitRepos/test.git
$ git init --bare
Initialized empty Git repository in C:/gitRepos/test.git/

git@<server> /cygdrive/c/gitRepos/test.git
$ exit
logout
Connection to <server> closed

但是,当我尝试从服务器克隆时,它不起作用:

$ git clone ssh://git@<server>:22/cygdrive/c/gitRepos/test.git
Cloning into test...
git@<server>'s password:
fatal: The remote end hung up unexpectedly

我怎样才能让它工作?

【问题讨论】:

    标签: git ssh windows-server-2003 msysgit copssh


    【解决方案1】:

    请看一下这个answer。也许你有同样的问题?

    【讨论】:

    • 不,Git 和 CopSSH 都在使用他们的 Bash 版本——正如我所说,我可以使用 SSH 登录,而且 Git 工作正常。只是当我尝试运行 git clone 时它不起作用。
    • 那么也许您将 SSH 密钥存储在两个单独的文件夹中?并且文件克隆git尝试访问错误的密钥对?
    • 实际上,我没有使用 SSH 密钥 - 只是密码。
    • 为什么需要 CopSSH 客户端?如果你安装了msysgit它已经有一个ssh可执行文件,所以你可以尝试从msysgit bash 建立ssh会话并调试ssh命令输出并找出原因。我相信你会看到,那个 git 的 ssh 缺少一些重要的东西。
    • 我没有使用 CopSSH 客户端 - 它是一个服务器
    猜你喜欢
    • 1970-01-01
    • 2018-03-07
    • 2013-04-19
    • 2017-08-07
    • 1970-01-01
    • 2017-09-09
    • 1970-01-01
    • 2016-08-15
    相关资源
    最近更新 更多