加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用CopSSH和MSysGit从Windows克隆git存储库

发布时间:2020-12-14 05:40:33 所属栏目:Windows 来源:网络整理
导读:我在运行 Windows 2003 Server的计算机上设置 Git服务器时遇到问题. 我在服务器上安装了CopSSH,并且可以使用SSH成功??连接到服务器.然后,我在服务器上安装了MSysGit(只是已编译的可执行文件).最后,我在CopSSH Bash shell中使用了ln -s,在CopSSH的bin目录中创
我在运行 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

我怎样才能让它发挥作用?

解决方法

请看看这个 answer.也许你有同样的问题?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读