gpt4 book ai didi

git-update-server-info 不足以克隆远程仓库?

转载 作者:太空狗 更新时间:2023-10-29 13:48:05 25 4
gpt4 key购买 nike

我想通过 Nginx HTTPS 服务器提供一个 git 存储库。

我已将提交后 Hook 设置为运行 git-update-server-info 以更新“哑”后端的引用。

通过 HTTPS 接口(interface) pull 更新工作正常,但是,当最初检查存储库时它失败了:

[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 backports),在客户端上我运行的是 1.7.2.2(来自 Arch Linux)

关于如何解决这个问题有什么提示吗?不幸的是,目前无法运行“智能”HTTP 后端。

最佳答案

有同样的错误,但在 URL 中包含用户名对我有用:

https://myuser@server/git/test.git/

关于git-update-server-info 不足以克隆远程仓库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3667894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com