Gerrit provides configuration parameters for integration with gitweb. Add the gitweb directory to the Apache configuration by creating a "gitweb" file inside the Apache conf. After you have installed Apache, you will want to create a new service user to use with Apache. You must grant the new account run as service permission:.
The gitweb version in msysgit is missing several important and required perl modules, including CGI. The perl included with the msysgit distro 1. You can verify by checking for perl modules. From an msys console, execute the following to check:.
To enable the external gitweb integration, set gitweb. Add the following:. Active Oldest Votes. Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta.
New post summary designs on greatest hits now, everywhere else eventually. Related 0. Hot Network Questions. The default configuration with no configuration file at all may work perfectly well for some installations. The configuration variables described below control how gitweb finds Git repositories, and how repositories are displayed and accessed. This variable has to be set correctly for gitweb to find repositories. It is purely performance optimization, originally intended for MacOS X, where recursive directory traversal is slow.
Gitweb follows symbolic links, but it detects cycles, ignoring any duplicate files and directories. Show repository only if this file exists in repository. Only effective if this variable evaluates to true.
By default this variable is not set, which means that this feature is turned off. Function used to determine which repositories should be shown. See also more involved example in "Controlling access to Git repositories" subsection on gitweb[1] manpage. Only allow viewing of repositories also shown on the overview page.
By default this variable is not set, which means that you can directly access those repositories that are hidden from projects list page e. The following configuration variables tell gitweb where to find files. The values of these variables are paths on the filesystem. Core git executable to use. This can just be "git" if your web server has a sensible PATH; from security point of view it is better to use absolute path to git binary.
If you have multiple Git versions installed it can be used to choose which one to use. Must be correctly set for gitweb to be able to work. If no mimetypes file is found, mimetype guessing based on extension of file is disabled. Unset by default. Note that highlight feature must be set for gitweb to actually use syntax highlighting.
NOTE : for a file to be highlighted, its syntax type must be detected and that syntax must be supported by "highlight". The default syntax detection is minimal, and there are many supported syntax types with no detection by default.
There are three options for adding syntax detection. The last priority is the "highlight" configuration of Shebang regular expressions to detect the language based on the first line in the file, for example, matching the line "!
For example if repositories you are hosting use "phtml" extension for PHP files, and you want to have correct syntax-highlighting for those files, you can add the following to gitweb configuration:. The configuration variables described below configure some of gitweb links: their target and their look text or image , and where to find page prerequisites stylesheet, favicon, images, scripts. Usually they are left at their default values, with the possible exception of stylesheets variable. You might specify more than one stylesheet, for example to use "gitweb.
For example, you can add a site stylesheet by putting. Those values that are relative paths are relative to base URI of gitweb. Points to the location where you put git-logo. This image is displayed in the top right corner of each gitweb page and used as a logo for the Atom feed. Relative to the base URI of gitweb as a path. Points to the location where you put git-favicon. Relative to the base URI of gitweb. Points to the location where you put gitweb. Note that this single file is generated from multiple individual JavaScript "modules".
Target of the home link on the top of all pages the first part of view "breadcrumbs". By default it is set to "projects", as this link leads to the list of projects. Another popular choice is to set it to the name of site. Note that it is treated as raw HTML so it should not be set from untrusted sources.
Additional links to be added to the start of the breadcrumb trail before the home link, to pages that are logically "above" the gitweb projects list, such as the organization and department which host the gitweb server. URI and label title for the Git logo link or your site logo, if you chose to use different logo image. You can adjust how pages generated by gitweb look using the variables described below. You can change the site name, add common headers and footers for all pages, and add a description of this gitweb installation on its main page which is the projects list page , etc.
Name of your site or organization, to appear in page titles. Set it to something descriptive for clearer bookmarks etc. No default value.
Name of a file with HTML to be included at the top of each page. Relative to the directory containing the gitweb. Name of a file with HTML to be included at the bottom of each page. By default set to indextext.
The width in characters of the "Description" column of the projects list. Longer descriptions will be truncated trying to cut at word boundary ; the full description is available in the title attribute usually shown on mouseover.
The default is 25, which might be too small if you use long project descriptions. Valid values are "none" unsorted , "project" projects are by project name, i. Default charset for text files. If this is not set, the web server configuration will be used. Gitweb assumes this charset when a line contains non-UTF-8 characters.
The fallback decoding is used without error checking, so it can be even "utf-8". The value must be a valid encoding; see the Encoding::Supported 3pm man page for a list.
0コメント