0
我跟着這個教程:HTTP://www.jeremyskinner.co.uk/2010/07/31/hosting-a-git-server-under -apache式窗口/ 舉辦一個Git倉庫在Windows Server託管git倉庫,無法克隆:SSH錯誤:錯誤的文件號
步驟上: 安裝的git &創建一個測試庫 安裝Apache(我使用WAMP的服務器,它是混帳之前安裝) 編輯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"
我知道這是相當不安全的,但我只是試圖得到th工作第一 Ë基礎,所以我重新啓動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
我做了什麼錯?
好吧,現在我得到:克隆到測試... 致命的:http://xxx.xxx.xxx.xxx:xxxx/repositories/Test.git/info/refs找不到:你是否在服務器上運行git update-server-info? – Berty
@Berty:對不起,我從來沒有用過通過HTTP的克隆。但正如輸出所示,您可能需要運行'git update-server-info'? – ZeissS