我试过建立gitweb,但是当我加载页面时,它会变得很奇怪.

编辑:如果人们被误解了,应该是这样的:

这就是我的lighttpd配置文件的样子:
server.port = 80
server.username = "http"
server.groupname = "http"
server.document-root = "/usr/share/gitweb"
server.errorlog = "/var/log/lighttpd/error.log"
dir-listing.activate = "enable"
index-file.names = ( "gitweb.cgi" )
cgi.assign = (
".cgi" => ""
)
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
server.modules += (
"mod_cgi",
"mod_setenv"
)
setenv.add-environment = (
"GITWEB_CONFIG" => "/etc/conf.d/gitweb.conf"
)这就是gitweb.conf的样子:
$git_temp = "/tmp";
# The directories where your projects are. Must not end with a slash.
$projectroot = "/path/to/projects";
# Base URLs for links displayed in the web interface.
our @git_base_url_list = qw(git://localhost http://git@localhost);(/path/to/projects只是给你一个想法。)
当我使用git instaweb时,它看起来很好,尽管它似乎忽略了我试图使用的新gitweb.css文件。编辑:,这是因为我没有更新缓存。
有什么想法吗?
发布于 2011-08-20 13:05:41
问题是CSS文档没有被正确识别。
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css"
)需要设置mime类型。
发布于 2011-08-19 21:32:03
gitweb只在裸存储库上工作。所以确保你有一个。您的屏幕截图看起来像是创建了一个具有完整工作树的存储库,并指向该目录。
编辑当前版本的gitweb也是非空的,但是您的系统可能有一个旧版本。
存储库的缺失名称可以在git-config中配置:
[gitweb]
description = "My Repository Description"
cloneurl = git://here.you.could/clone/me.git
owner = "Me"有更多的配置参数可用,只需查看文档(在/usr/share/doc/git*下)
https://stackoverflow.com/questions/7127551
复制相似问题