gpt4 book ai didi

gitlist 无法获取存储库列表之外的任何内容

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

我正在尝试在 CentOS Linux 上设置 gitlist(在重要的情况下使用 gitolite——我已经放宽了由 gitolite 管理的 repo 目录的权限)。

我今天从 gitlist.org 提取了 0.3 版本的压缩包。

我的 config.ini 看起来像这样:

client = '/usr/bin/git' ; Your git executable path
repositories = '/home/gitolite/repositories/' ; Path to your repositories

[app]
debug = true
; I don't know if baseurl is still needed..seems like my results are the same either way
baseurl = 'http://sub.example.com.com/gitlist' ; Base URL of the application

httpd.conf 中的虚拟主机指令:

<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName sub.example.com
<Directory "/var/www/html">
AllowOverride All
Options -Indexes
</Directory>
</VirtualHost>

访问权限:

<IfModule mod_rewrite.c>
Options -MultiViews

RewriteEngine On
RewriteBase /var/www/html/gitlist/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,NC]

AuthName "Git List"
AuthType Basic
AuthUserFile /var/www/.gitlistpwds
Require valid-user

</IfModule>
<Files config.ini>
order allow,deny
deny from all
</Files>

使用此设置,转到 http://sub.example.com/gitlist导致浏览器错误消息说/index.php 不存在(即它正在尝试转到/var/www/html/index.php )

在这种情况下,如果我转到 http://sub.example.com/gitlist/index.php ,存储库列表(显然)正确显示。当我单击其中一个存储库时,它尝试执行时出现问题,git。我得到:

Whoops, looks like something went wrong.

1/1 RuntimeException: Unknown option: -c
(std git usage message omitted)

如果我从 .htaccess 中删除重写规则,我可以通过指定或不指定 index.php 来访问索引页面。但在那种情况下,当我点击一个仓库时,它会尝试在 gitlist 目录下找到仓库:

The requested URL /gitlist/testing.git/ was not found on this server.

有人可以帮忙解决这个问题吗?

最佳答案

我终于成功地测试了 gitlist。

我删除了 .htaccess,并在 httpd.conf 中保留了以下配置:

# GitList on 28473
<IfModule !php5_module>
LoadModule php5_module modules/libphp5.so
</IfModule>
Listen 28473
<VirtualHost aserver.prod.fr.company:28473>
ServerName aserver.prod.fr.company
ServerAlias aserver
SSLCertificateFile "/home/vonc/apache/crt"
SSLCertificateKeyFile "/home/vonc/apache/key"
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SetEnv GIT_HTTP_BACKEND "/home/vonc/usr/local/apps/git/libexec/git-core/git-http-backend"
DocumentRoot /home/vonc/gitlist/github
Alias /gitlist /home/vonc/gitlist/github
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<FilesMatch ".php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
<Directory /home/vonc/gitlist/github>
SSLOptions +StdEnvVars
Options ExecCGI +Indexes +FollowSymLinks
AllowOverride All
order allow,deny
Allow from all
Options -MultiViews

DirectoryIndex index.php
RewriteEngine On

RewriteBase /home/vonc/gitlist/github/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ gitlist/index.php/$1 [L,NC]

</Directory>

# RewriteLog "/home/vonc/gitlist/logs/apache_gitlist_rewrite_log"
# RewriteLogLevel 3
CustomLog "/home/vonc/gitlist/logs/apache_gitlist_ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
ErrorLog "/home/vonc/gitlist/logs/apache_gitlist_error_log"
TransferLog "/home/vonc/gitlist/logs/apache_gitlist_access_log"
LogLevel info
</VirtualHost>

(来自 my own committhis setup )

注意:

  • 这是为了在它自己的子目录中运行 gitlist:https://myServer/gitlist(不仅仅是 https://myserver)
  • 它不会显示 git 存储库中子目录下的任何文件:参见 Issue 250 , 补丁正在等待中

关于gitlist 无法获取存储库列表之外的任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14166702/

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