fork of legit
  • Go 80.3%
  • Nix 11.2%
  • CSS 8.3%
  • Just 0.2%
2026-04-05 14:35:35 +02:00
config add config options for atreugo 2025-11-15 12:44:09 +01:00
data prefetch main repo metadata 2025-11-21 20:41:20 +01:00
git fix tree/content routes not using reference param 2026-03-27 23:09:30 +01:00
nix default to IPv6 address 2025-11-16 12:55:02 +01:00
routes fix incorrect sanitation of HTML tags in non-markdown files 2026-04-05 14:35:35 +02:00
static remove icon 2025-11-16 20:32:33 +01:00
templates fix link generation in repos under categoies 2026-01-05 19:57:34 +01:00
.editorconfig style: add editorconfig and re-format style.css 2025-03-31 10:40:56 +02:00
.envrc switch to flakes 2025-06-10 06:59:21 +02:00
.gitignore use config.yaml as deployed configuration 2025-07-16 13:43:32 +02:00
.golangci.yaml enable formatting via golangci-lint 2025-11-18 20:46:08 +01:00
config.yaml embed static files 2025-07-16 13:44:49 +02:00
flake.lock update flake inputs 2025-11-13 12:09:43 +01:00
flake.nix use nixpkgs-unstable instead of nixos-unstable 2025-08-30 23:23:46 +02:00
go.mod don't use user input for repository path access 2025-11-23 18:51:45 +01:00
go.sum prune go.mod 2025-11-15 14:28:29 +01:00
justfile add ci task to justfile 2025-04-03 17:45:55 +02:00
license rename to elgit 2025-03-29 21:05:17 +01:00
main.go switch to atreugo 2025-11-15 12:44:08 +01:00
modd.conf use config.yaml as deployed configuration 2025-07-16 13:43:32 +02:00
readme.md use markdown for readme 2025-11-20 17:06:37 +01:00
unveil.go remove outdated extra build tag comment 2025-11-20 17:06:37 +01:00
unveil_stub.go address linter complaints 2025-11-13 17:25:11 +01:00

elgit

A git web frontend written in Go, forked from elgit after the author moved on.

Fork changes

  • Uses gomponents instead of html/template.
  • Better integration with gitolite
  • repo.ignore is ignored: only repositories listed in projects.list are shown.
  • Supports subdirectories
  • Removed syntax highlighting

Features

  • Cloning over http(s).
  • Less archaic HTML.
  • Not CGI.

Installing

Clone it, 'go build' it.

Config

Uses yaml for configuration. Looks for a 'config.yaml' in the current directory by default; pass the '--config' flag to point it elsewhere.

Example config.yaml:

repo:
  root: /var/lib/gitolite
  readme:
    - readme
    - README
    - readme.md
    - README.md
  mainBranch:
    - master
    - main
meta:
  title: git good
  description: i think it's a skill issue
server:
  name: git.icyphox.sh
  host: 127.0.0.1
  port: 5555
  compress: true
  development: false

These options are fairly self-explanatory, but of note are:

  • repo.root: where all your git repos live (or die). This should contain projects.list and repositories/
  • repo.readme: readme files to look for.
  • repo.mainBranch: main branch names to look for.
  • repo.unlisted: repos to hide, relative to root/repositories.
  • server.name: used for go-import meta tags and clone URLs.
  • server.compress: automatically compress responses with gzip or zstd

Notes

  • Run elgit behind a TLS terminating proxy like relayd(8) or nginx.
  • Cloning only works in bare repos---this is a limitation inherent to git. You can still view non-bare repos just fine in elgit.
  • Pushing over https, while supported, is disabled because auth is a pain. Use ssh.
  • Paths are unveil(2)'d on OpenBSD.

License

elgit is licensed under MIT.