gitweb

command module
v0.0.0-...-aa46481 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2020 License: AGPL-3.0 Imports: 22 Imported by: 0

README

Gitweb provides a minimal git web interface, sufficient for most small projects.

Features:
	- Multiple, separate repositories
	- Repository references (HEAD, master, etc.)
	- Supports bare repositories
	- Typically-expensive responses are cached
	- Process restriction with pledge(2) and unveil(2) on OpenBSD (optional)
	- Chroot (optional)
	- HTTPS (optional)

The page layout of gitweb was modeled after stagit (git.codemadness.org/stagit),
although the source code is independent.

Example configuration file (see config.go for full structure):

	{
		"https": true,
		"https_crt": "/path/to/server.crt",
		"https_key": "/path/to/server.key",
		"port": ":8443",
		"repos": [
			{
				"cache_duration": "2h",
				"description": "A repo.",
				"path": "/path/to/local/repo",
				"ref": "master"
			},
			{
				"bare": true,
				"cache_duration": "24h",
				"description": "A repo cloned with --bare.",
				"path": "/path/to/local/repo.git",
				"ref": "master"
			}
		]
	}

Notes for OpenBSD users:

To use gitweb's built-in pledge(2) and unveil(2) restrictions you must customize
the config. To enable OpenBSD restrictions:

	"openbsd": true

By default this unveils repository paths and the HTTPS crt and key paths.
However it will not unveil the path to git nor the dynamic linker! For this
specify "openbsd_unveils" as an array of additional unveils. On OpenBSD 6.5:

	"openbsd_unveils": [
		["/usr/libexec/ld.so", "r"],
		["/usr/lib/", "r"],
		["/usr/local/lib/", "r"],
		["/usr/local/bin/git", "rx"]
	]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL