gpt4 book ai didi

git - git镜像后无法从远程存储库读取

转载 作者:行者123 更新时间:2023-12-04 18:47:52 25 4
gpt4 key购买 nike

我一直在尝试为我的一个 gitolite 存储库创建镜像,但遇到了问题。我使用命令在与原始 git 存储库相同的机器上创建了镜像;

cd /var/repo_mirrors
git clone --mirror /home/gitolite/repositories/Test.git

(我基本上是按照这里的步骤操作的: http://www.redmine.org/projects/redmine/wiki/RedmineRepositories#Git-repository)

我还希望能够浏览存储库,所以我对 www-data 做了一个 chown,以便 Apache 可以读取。

这一切都很好。但现在的问题是我无法克隆/推送原始存储库。当我尝试时,出现以下错误;

fatal: failed to read object a0d91d1cc22bfbd5666d51c1ea7a5015008e50b6: Permission denied fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.



备注 : 在镜子之前一切正常

任何关于出了什么问题的想法将不胜感激。

最佳答案

这可能与 git clone 期间创建的硬链接(hard link)有关。 :

The files under .git/objects/ directory are hardlinked to save space when possible.



尝试相同的克隆,但没有硬链接(hard link):
cd /var/repo_mirrors
git clone --mirror --no-hardlinks /home/gitolite/repositories/Test.git

关于git - git镜像后无法从远程存储库读取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20754018/

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