开发者

Gitweb not displaying correctly

I tried setting up gitweb, but when I load the page, it comes out weird...

Gitweb not displaying correctly


Edit: In case people misunderstood, this is what it should look like:

Gitweb not displaying correctly


This is what my lighttpd configuration file looks like:

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"
)

This is what gitweb.conf looks like:

$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 is just to give you an idea.)

When I use git instaweb, it seems to come out fine, although it looks like it's ignoring the new gitweb.css file that I'm try开发者_JAVA百科ing to use. Edit: It's because I didn't update the cache.

Any ideas?


The problem is that CSS documents aren't being recognized properly.

mimetype.assign = (
    ".html" => "text/html",
    ".txt" => "text/plain",
    ".jpg" => "image/jpeg",
    ".png" => "image/png",
    ".css" => "text/css"
)

The mime type needed to be set.


gitweb works only on bare repositories. So make sure you have one. Your screen-shot looks like you have created one repository with full working tree, and pointing to this directory.

EDIT The current version of gitweb works on non-bare also, but your system may have an older one.

The missing name of the repository could be configured in your git-config:

[gitweb]
  description = "My Repository Description"
  cloneurl    = git://here.you.could/clone/me.git
  owner       = "Me"

There are more config parameters available, just have a look at the documentation (under /usr/share/doc/git*)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜