all repos

mugit @ 75fc9d1e504f3648db27f849ce00445dae942706

🐮 git server that your cow will love
2 files changed, 140 insertions(+), 103 deletions(-)
new readme
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-02-23 21:49:57 +0200
Authored at: 2026-02-23 16:57:09 +0200
Change ID: lylouwruuwvzurwlmmmmksyyzwqnutsw
Parent: 01d1381
A README.md
···
        
        1
        +# mugit

      
        
        2
        +

      
        
        3
        +A lightweight, self-hosted Git server that your cow will love.

      
        
        4
        +

      
        
        5
        +[See it in action!](https://git.olexsmir.xyz)

      
        
        6
        +

      
        
        7
        +## Features

      
        
        8
        +

      
        
        9
        +- Web interface — browse repositories, view commits, files, and diffs

      
        
        10
        +- Git Smart HTTP — clone over HTTPS (use SSH for pushing)

      
        
        11
        +- Git over SSH — push and clone over SSH

      
        
        12
        +- Mirroring — automatically mirror repositories (supports GitHub authentication)

      
        
        13
        +- Private repositories — repos accessible only via SSH

      
        
        14
        +- CLI — command-line for managing your repositories

      
        
        15
        +

      
        
        16
        +## Quick install & deploy

      
        
        17
        +

      
        
        18
        +```sh

      
        
        19
        +git clone https://git.olexsmir.xyz/mugit.git

      
        
        20
        +cd mugit

      
        
        21
        +go build

      
        
        22
        +

      
        
        23
        +# or

      
        
        24
        +go install github.com/olexsmir/mugit@latest

      
        
        25
        +```

      
        
        26
        +

      
        
        27
        +For nixos you can use our flake, see [my config](https://git.olexsmir.xyz/dotfiles/blob/master/nix/modules/mugit.nix) for reference.

      
        
        28
        +

      
        
        29
        +Start the server:

      
        
        30
        +

      
        
        31
        +```sh

      
        
        32
        +# start server with default config lookup

      
        
        33
        +mugit serve

      
        
        34
        +

      
        
        35
        +# start with a custom config path

      
        
        36
        +mugit -c /path/to/config.yaml serve

      
        
        37
        +```

      
        
        38
        +

      
        
        39
        +

      
        
        40
        +## Configuration

      
        
        41
        +

      
        
        42
        +mugit uses YAML for configuration. By default the server looks for a configuration file in this order (override with `-c` / `--config`):

      
        
        43
        +1. `./config.yaml`

      
        
        44
        +2. `/etc/mugit.yaml`

      
        
        45
        +3. `/var/lib/mugit/config.yaml`

      
        
        46
        +

      
        
        47
        +

      
        
        48
        +Durations follow Go's duration syntax (examples: `1h`, `30m`, `5s`). See: https://pkg.go.dev/time#ParseDuration

      
        
        49
        +

      
        
        50
        +Minimal configuration example:

      
        
        51
        +

      
        
        52
        +```yaml

      
        
        53
        +meta:

      
        
        54
        +  host: git.olexsmir.xyz

      
        
        55
        +

      
        
        56
        +repo:

      
        
        57
        +  dir: /var/lib/mugit

      
        
        58
        +```

      
        
        59
        +

      
        
        60
        +Full example:

      
        
        61
        +

      
        
        62
        +```yaml

      
        
        63
        +server:

      
        
        64
        +  host: 0.0.0.0 # bind address (0.0.0.0 = all interfaces)

      
        
        65
        +  port: 5555    # HTTP port (defaults to 8080 when omitted)

      
        
        66
        +

      
        
        67
        +meta:

      
        
        68
        +  title: "My Git Server"    # site title shown on index page

      
        
        69
        +  description: "A place for my projects"

      
        
        70
        +  host: git.example.com     # used for clone URLs and go-import meta tag

      
        
        71
        +

      
        
        72
        +repo:

      
        
        73
        +  dir: /var/lib/mugit   # directory with repositories

      
        
        74
        +  # Default README filenames (applied when omitted):

      
        
        75
        +  readmes:

      
        
        76
        +    - README.md

      
        
        77
        +    - readme.md

      
        
        78
        +    - README.html

      
        
        79
        +    - readme.html

      
        
        80
        +    - README.txt

      
        
        81
        +    - readme.txt

      
        
        82
        +    - readme

      
        
        83
        +  # Default branch names considered the repository 'master' (applied when omitted):

      
        
        84
        +  masters:

      
        
        85
        +    - master

      
        
        86
        +    - main

      
        
        87
        +

      
        
        88
        +# ssh: push/clone over SSH

      
        
        89
        +ssh:

      
        
        90
        +  enable: true

      
        
        91
        +  port: 2222  # SSH port (default 2222)

      
        
        92
        +  host_key: /var/lib/mugit/host   # path to SSH host key (generate with ssh-keygen)

      
        
        93
        +  # Only these public keys can access private repos and push to others.

      
        
        94
        +  keys:

      
        
        95
        +    - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA......

      
        
        96
        +    - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA......

      
        
        97
        +

      
        
        98
        +# mirror: automatic mirrors of external repositories

      
        
        99
        +mirror:

      
        
        100
        +  enable: true

      
        
        101
        +  interval: 1h  # sync frequency

      
        
        102
        +  # Tokens can be provided directly, or read from environment/file:

      
        
        103
        +  # - literal: "ghp_xxxxxxxxxxxx"

      
        
        104
        +  # - from env: "${env:GITHUB_TOKEN}" (will read $GITHUB_TOKEN)

      
        
        105
        +  # - from file: "${file:/abs/path/to/token.txt}"

      
        
        106
        +  github_token: "${env:GITHUB_TOKEN}"

      
        
        107
        +

      
        
        108
        +cache:

      
        
        109
        +  home_page: 5m   # cache index/home page

      
        
        110
        +  readme: 1m      # cache rendered README per repo

      
        
        111
        +  diff: 15m       # cache computed diffs

      
        
        112
        +```

      
        
        113
        +

      
        
        114
        +## CLI

      
        
        115
        +

      
        
        116
        +```sh

      
        
        117
        +# start server

      
        
        118
        +mugit serve

      
        
        119
        +

      
        
        120
        +# create new public repository

      
        
        121
        +mugit repo new myproject

      
        
        122
        +

      
        
        123
        +# create new private repository

      
        
        124
        +mugit repo new --private myproject

      
        
        125
        +

      
        
        126
        +# create a mirror of an external repository

      
        
        127
        +mugit repo new myproject --mirror https://codeberg.org/user/repo

      
        
        128
        +mugit repo new myproject --private --mirror https://github.com/user/repo

      
        
        129
        +

      
        
        130
        +# toggle repository visibility

      
        
        131
        +mugit repo private myproject

      
        
        132
        +

      
        
        133
        +# show and set repository description

      
        
        134
        +mugit repo description myproject

      
        
        135
        +mugit repo description myproject "My awesome project"

      
        
        136
        +```

      
        
        137
        +

      
        
        138
        +## License

      
        
        139
        +

      
        
        140
        +mugit is licensed under the MIT License.

      
D readme
···
        1
        
        -mugit

      
        2
        
        ------

      
        3
        
        -

      
        4
        
        -A cgit/gitweb-like server that your cow will love.

      
        5
        
        -

      
        6
        
        -FEATURES

      
        7
        
        -- Web interface - browse repositories, view commits, files, and diffs

      
        8
        
        -- Git Smart HTTP - clone over https (use ssh for pushing)

      
        9
        
        -- Git over SSH - push and clone over ssh

      
        10
        
        -- Private repositories - repositories that are only accessible via ssh

      
        11
        
        -- Mirroring - Automatically mirror repositories (supports github auth)

      
        12
        
        -- CLI - for managing your repos

      
        13
        
        -

      
        14
        
        -INSTALL

      
        15
        
        -

      
        16
        
        -Clone it, `go build` it.

      
        17
        
        -

      
        18
        
        -You can also you nix flake if you're on nixos.

      
        19
        
        -

      
        20
        
        -CONFIG

      
        21
        
        -

      
        22
        
        -Uses yaml for configuration, look for a 'config.yaml' in:

      
        23
        
        -1. `/var/lib/mugit/config.yaml`

      
        24
        
        -2. `$XDG_CONFIG_HOME/mugit/config.yaml` (or `~/.config/mugit/config.yaml`)

      
        25
        
        -3. `/etc/mugit/config.yaml`

      
        26
        
        -

      
        27
        
        -Pass `--config` flag to point it elsewhere

      
        28
        
        -

      
        29
        
        -Example config:

      
        30
        
        -

      
        31
        
        -    server:

      
        32
        
        -      host: 0.0.0.0

      
        33
        
        -      port: 5555

      
        34
        
        -

      
        35
        
        -    meta:

      
        36
        
        -      # title and description you see on the index page

      
        37
        
        -      title: My Git Server

      
        38
        
        -      description: A place for my projects

      
        39
        
        -      # used for clone urls and go-import meta tag

      
        40
        
        -      host: git.example.com

      
        41
        
        -

      
        42
        
        -    repo:

      
        43
        
        -      # where all your repo live (maybe die too). mugit doesn't traverse subdirs

      
        44
        
        -      dir: /var/lib/mugit

      
        45
        
        -      # readme files to look for

      
        46
        
        -      readmes:

      
        47
        
        -        - README.md

      
        48
        
        -        - readme.md

      
        49
        
        -      # master branches name to look for

      
        50
        
        -      masters:

      
        51
        
        -        - main

      
        52
        
        -        - master

      
        53
        
        -

      
        54
        
        -    ssh:

      
        55
        
        -      enable: true

      
        56
        
        -      port: 2222

      
        57
        
        -      # path to ssh private key for ssh server to use

      
        58
        
        -      # you can generate it with: ssh-keygen -f key/path

      
        59
        
        -      host_key: /var/lib/mugit/ssh_host_key

      
        60
        
        -      # list of keys that are allowed to access private repos

      
        61
        
        -      keys:

      
        62
        
        -        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLLJdkVYKZgsayw+sHanKPKZbI0RMS2CakqBCEi5Trz

      
        63
        
        -        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPQ0Qz0DFB+rGrD8ScUqbUTZ1/O8FHrOBF5bIAGQgMj 

      
        64
        
        -

      
        65
        
        -    mirror:

      
        66
        
        -      enable: true

      
        67
        
        -      # with which interval sync repo

      
        68
        
        -      interval: 1h

      
        69
        
        -      # github token for avoiding github rate limiting

      
        70
        
        -      github_token: "ghp_xxxxxxxxxxxx"

      
        71
        
        -

      
        72
        
        -

      
        73
        
        -CLI

      
        74
        
        -

      
        75
        
        -    # start server

      
        76
        
        -    mugit serve

      
        77
        
        -

      
        78
        
        -    # run with custom config

      
        79
        
        -    mugit -c /path/to/config.yml serve

      
        80
        
        -

      
        81
        
        -    # create new repository

      
        82
        
        -    mugit repo new myproject

      
        83
        
        -

      
        84
        
        -    # create new private repository

      
        85
        
        -    mugit repo new --private myproject

      
        86
        
        -

      
        87
        
        -    # create new mirror

      
        88
        
        -    mugit repo new myproject --mirror https://github.com/user/repo

      
        89
        
        -    mugit repo new myproject --mirror https://codeberg.org/user/repo

      
        90
        
        -

      
        91
        
        -    # toggle repository private status

      
        92
        
        -    mugit repo private myproject

      
        93
        
        -

      
        94
        
        -    # get repository description

      
        95
        
        -    mugit repo description myproject

      
        96
        
        -

      
        97
        
        -    # set new description

      
        98
        
        -    mugit repo description myproject "My awesome project"

      
        99
        
        -

      
        100
        
        -

      
        101
        
        -LICENSE

      
        102
        
        -

      
        103
        
        -mugit is licensed under MIT.