3 files changed,
125 insertions(+),
1 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-02-06 23:49:13 +0200
Change ID:
vsormtnyulppyxyqkuszsrmknwuwwxrs
Parent:
6ba4dfd
A
LICENSE
@@ -0,0 +1,21 @@
+MIT License + +Copyright (c) 2026 Oleksandr Smirnov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.
M
flake.nix
@@ -118,7 +118,7 @@ type = format.type;
default = { }; description = '' Configuration for mugit. See documentation for available options. - https://github.com/olexsmir/mugit/blob/main/docs.md + https://github.com/olexsmir/mugit/blob/main/README.md ''; example = literalExpression '' {
A
readme
@@ -0,0 +1,103 @@
+mugit +----- + +A cgit/gitweb-like server that your cow will love. + +FEATURES +- Web interface - browse repositories, view commits, files, and diffs +- Git Smart HTTP - clone over https (use ssh for pushing) +- Git over SSH - push and clone over ssh +- Private repositories - repositories that are only accessible via ssh +- Mirroring a Automatically mirror repositories (supports github auth) +- CLI - for managing your repos + +INSTALL + +Clone it, `go build` it. + +You can also you nix flake if you're on nixos. + +CONFIG + +Uses yaml for configuration, look for a 'config.yaml' in: +1. `/var/lib/mugit/config.yaml` +2. `$XDG_CONFIG_HOME/mugit/config.yaml` (or `~/.config/mugit/config.yaml`) +3. `/etc/mugit/config.yaml` + +Pass `--config` flag to point it elsewhere + +Example config: + + server: + host: 0.0.0.0 + port: 5555 + + meta: + # title and description you see on the index page + title: My Git Server + description: A place for my projects + # used for clone urls and go-import meta tag + host: git.example.com + + repo: + # where all your repo live (maybe die too). mugit doesn't traverse subdirs + dir: /var/lib/mugit + # readme files to look for + readmes: + - README.md + - readme.md + # master branches name to look for + masters: + - main + - master + + ssh: + enable: true + port: 2222 + # path to ssh private key for ssh server to use + # you can generate it with: ssh-keygen -f key/path + host_key: /var/lib/mugit/ssh_host_key + # list of keys that are allowed to access private repos + keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLLJdkVYKZgsayw+sHanKPKZbI0RMS2CakqBCEi5Trz + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPQ0Qz0DFB+rGrD8ScUqbUTZ1/O8FHrOBF5bIAGQgMj + + mirror: + enable: true + # with which interval sync repo + interval: 1h + # github token for avoiding github rate limiting + github_token: "ghp_xxxxxxxxxxxx" + + +CLI + + # start server + mugit serve + + # run with custom config + mugit -c /path/to/config.yml serve + + # create new repository + mugit repo new myproject + + # create new private repository + mugit repo new --private myproject + + # create new mirror + mugit repo new myproject --mirror https://github.com/user/repo + mugit repo new myproject --mirror https://codeberg.org/user/repo + + # toggle repository private status + mugit repo private myproject + + # get repository description + mugit repo description myproject + + # set new description + mugit repo description myproject "My awesome project" + + +LICENSE + +mugit is licensed under MIT.