Fork of (may hard fork, we'll see)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
James Mills 6a7fff648f
Add no-thin capability to work-around some go-git limitations
1 month ago
config Add push support 1 month ago
git Add no-thin capability to work-around some go-git limitations 1 month ago
routes Fix getDescription 1 month ago
static added license to frontend 1 month ago
templates Fix repo template 1 month ago
.gitignore all: init 2 months ago Fix README 1 month ago
config.yaml Add push support 1 month ago
go.mod Fix getDescription 1 month ago
go.sum Fix getDescription 1 month ago
license add license 1 month ago
main.go Use a different HTTP router/muxer 1 month ago


A git web frontend written in Go.

Pronounced however you like; I prefer channeling my beret-wearing Frenchman, and say "Oui, il est le git!"

But yeah it's pretty legit, no cap on god fr fr.


  • Fully customizable templates and stylesheets.
  • Cloning over http(s).
  • Less archaic HTML.
  • Not CGI.


Clone it, go build it.


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:

  scanPath: /var/www/git
    - readme
    - README
    - master
    - main
    - foo
    - bar
  templates: ./templates
  static: ./static
  title: git good
  description: i think it's a skill issue
  port: 5555

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

  • repo.scanPath: where all your git repos live (or die). legit doesn't traverse subdirs yet.
  • repo.readme: readme files to look for. Markdown isn't rendered.
  • repo.license: license files to look for.
  • repo.mainBranch: main branch names to look for.
  • repo.ignore: repos to ignore.
  • used for go-import meta tags and clone URLs.


  • Run legit 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 bare repos just fine in legit.
  • The default head.html template uses my CDN to fetch fonts -- you may or may not want this.
  • Pushing over https, while supported, is disabled because auth is a pain. Use ssh.
  • Paths are unveil(2)'d on OpenBSD.


  • "Private" repos only available over Tailscale.
  • Support or cgit-like filters (for readmes etc.).


legit is licensed under MIT.