Puppet-gitweb is a project mainly written in ..., it's free.
Installs and configures gitweb
# Override the defaults, optional
class { "gitweb::settings":
site_alias => "gitweb.example.com",
projectroot => "/home/git/repositories",
}
include gitweb # magic!