git web interface in go (fork)
Find a file
2024-01-29 21:30:56 -07:00
config add naive global mailmap support 2024-01-29 21:08:08 -07:00
git add naive global mailmap support 2024-01-29 21:08:08 -07:00
routes fix naming conflict for diff route 2024-01-29 21:30:56 -07:00
static nilix config 2023-02-04 10:07:44 -07:00
templates fix title tag and tree .. link 2023-02-09 23:31:09 -07:00
.gitignore
config.yaml nilix config 2023-02-04 10:07:44 -07:00
go.mod add naive global mailmap support 2024-01-29 21:08:08 -07:00
go.sum add naive global mailmap support 2024-01-29 21:08:08 -07:00
license add license 2022-12-19 18:09:45 +05:30
main.go add naive global mailmap support 2024-01-29 21:08:08 -07:00
readme update readme 2023-02-04 09:54:07 -07:00
unveil.go unveil: add git executable 2022-12-22 11:35:32 +05:30
unveil_stub.go unveil: initial commit 2022-12-22 11:17:59 +05:30

legit
-----

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.


FEATURES

• Fully customizable templates and stylesheets.
• 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:
      scanPath: /var/www/git
      readme:
        - readme
        - README
        - readme.md
        - README.md
      mainBranch:
        - master
        - main
      ignore:
        - foo
        - bar
    dirs:
      templates: ./templates
      static: ./static
    meta:
      title: git good
      description: i think it's a skill issue
      footer: served with legit vVERSION; email patches to MAINTAINER
      maintainerEmail: x@icyphox.sh
    server:
      name: git.icyphox.sh
      host: 127.0.0.1
      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 is rendered via
  BlackFriday and relative links to files in the repo are supported
• repo.mainBranch: main branch names to look for.
• repo.ignore: repos to ignore.
• meta.footer: footer HTML. VERSION is interpolated with the version string
  and MAINTAINER is interpolated with a mailto link to meta.maintainerEmail
  (can be empty)
• meta.maintainerEmail: probably your own (can be empty)
• server.name: used for go-import meta tags and clone URLs.


NOTES

• 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 normal 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.


IDEAS

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


LICENSE

legit is licensed under MIT.