all repos

mugit @ dc62a68

🐮 git server that your cow will love

mugit/readme (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
fix readme, 3 months ago
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.