【发布时间】:2011-04-09 17:37:47
【问题描述】:
我想通过 Nginx HTTPS 服务器创建一个 git 存储库。
我已将提交后挂钩设置为运行 git-update-server-info 以更新“哑”后端的 refs。
通过 HTTPS 接口拉取更新工作正常,但是,当最初检查存储库时,它会失败:
[test@test ttt]$ git clone https://server/git/test.git/
Cloning into thesis...
Username:
Password:
error: The requested URL returned error: 401 (curl_result = 22, http_code = 401, sha1 = 2be2bcc15d1a79eb4e37e03fd2070ee0f229457c)
error: Unable to find 2be2bcc15d1a79eb4e37e03fd2070ee0f229457c under https://test/git/test.git
Cannot obtain needed commit 2be2bcc15d1a79eb4e37e03fd2070ee0f229457c
while processing commit 6c155f7098fd75f23edf71ac5b70b7c22f6070e7.
error: Fetch failed.
在服务器端存储库上手动运行“git update-server-info”并不能解决问题,但运行“git gc”可以。
但是,“git gc”修复仅在我将更新推送到服务器之前有效,之后整个“git clone”问题再次开始。
在服务器上我正在运行 git 1.7.1(来自 Debian 反向端口),在客户端上我正在运行 1.7.2.2(来自 Arch Linux)
关于如何解决这个问题的任何提示?不幸的是,目前无法选择运行“智能”HTTP 后端。
【问题讨论】: