Skip to content

Commit 99ee247

Browse files
committed
chore: docs, readme, license
1 parent 6ba4dfd commit 99ee247

File tree

3 files changed

+125
-1
lines changed

3 files changed

+125
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Oleksandr Smirnov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
default = { };
119119
description = ''
120120
Configuration for mugit. See documentation for available options.
121-
https://github.com/olexsmir/mugit/blob/main/docs.md
121+
https://github.com/olexsmir/mugit/blob/main/README.md
122122
'';
123123
example = literalExpression ''
124124
{

readme

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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 a 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.

0 commit comments

Comments
 (0)