【发布时间】:2011-11-15 22:13:27
【问题描述】:
我遵循了本教程:http://www.jeremyskinner.co.uk/2010/07/31/hosting-a-git-server-under-apache-on-windows/ 在 Windows 服务器上托管 git 存储库
步骤: 安装 git 并创建一个测试存储库 安装 Apache(我使用的是 wamp 服务器,它是在 git 之前安装的) 编辑httpd.conf,添加:
<Directory />
Allow from all
</Directory>
SetEnv GIT_PROJECT_ROOT C:/wamp/www/repositories
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
"C:/Program Files/Git/libexec/git-core/git-http-backend.exe/$1"
我知道这很不安全,但我只是想先让基础知识发挥作用 所以我重新启动apache 然后我尝试使用以下命令从台式计算机克隆存储库:
git clone xxx.xxx.xxx.xxx:xxxx/repositories/Test.git
输出是:
Cloning into Test...
ssh: connect to host smarttelecom.no-ip.org port 22: Bad file number
fatal: The remote end hung up unexpectedly
我做错了什么?
【问题讨论】:
标签: windows apache git ssh clone