0

我安装了 cgit,现在可以通过浏览器访问我的 git repos。我有超过 5000 个回购。

我使用扫描选项,每次单击浏览器 cgit 中的任何内容时,都会扫描所有存储库以获取存储库所有者。它使它非常慢。我在 cgit 文件中禁用了 git owner ,但它没有帮助。这是我的 cgitrc 的一部分:

enable-git-config=0
enable-gitweb-owner=0
remove-suffix=1
scan-path=/opt/projects/git

这是我在浏览我的存储库时在日志文件中看到的内容:

Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7250/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7251/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7254/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7253/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7255/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7256/: Success (0)
Jan 25 11:36:50 ht-vm-cgit rc.local[1033]: Error reading owner-info for /opt/projects/git/7257/: Success (0)

以此类推。我如何告诉 git 不要查找所有者信息?

谢谢

4

2 回答 2

0

据我从源代码 cgit中了解到,它试图通过在 repo的根目录上/etc/passwd调用getpwuid来获取 repo 的所有者。

楼主在/etc/passwd吗?我不认为enable-gitweb-owner控制它。

于 2018-01-26T17:12:19.400 回答
0

也许你应该试试enable-index-owner https://git.zx2c4.com/cgit/tree/cgitrc.5.txt

enable-index-owner:
   Flag which, when set to "1", will make cgit display the owner of
   each repo in the repository index. Default value: "1".
于 2019-02-10T20:24:34.407 回答