Hash :
265b6ebe
Author :
Thomas de Grivel
Date :
2021-12-28T07:12:43
kmxgit is a web interface and a Git server written in C and Elixir / Phoenix.
kmxgit started as a frontend for git-auth.
Now public repositories are also supported.
git-auth handles all permissions for a single git user accessible
through SSH with just one config file (/etc/git/auth.conf
).
Please see git-auth README.md.
git clone https://git.kmx.io/kmx.io/kmxgit.git
cd kmxgit
mix deps.get
mix ecto.setup
bin/*
into /usr/local/bin
mix phx.server
or inside IEx with
iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
To setup public access repositories on HTTP or HTTPS you need to setup your web server to serve certain requests with git-http-backend.
First you need to setup
fcgiwrap to serve on 127.0.0.1:9001
.
Then in your nginx server config :
location ~ ^(.*/info/refs|.*/git-upload-pack)$ {
fastcgi_pass 127.0.0.1:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/libexec/git/git-http-backend;
fastcgi_param GIT_PROJECT_ROOT ~git;
fastcgi_param PATH_INFO $1;
}
phx.gen.auth
kmxgit - git server administration
Copyright 2021 Thomas de Grivel thoxdg@gmail.com
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
# kmxgit
[kmxgit](https://git.kmx.io/kmx.io/kmxgit) is a web interface and a Git
server written in C and Elixir / Phoenix.
kmxgit started as a frontend for
[git-auth](https://git.kmx.io/kmx.io/git-auth).
Now public repositories are also supported.
## Installation
### git-auth installation
git-auth handles all permissions for a single git user accessible
through SSH with just one config file (`/etc/git/auth.conf`).
Please see [git-auth README.md](https://git.kmx.io/kmx.io/git-auth).
### Phoenix installation
* Clone repo with `git clone https://git.kmx.io/kmx.io/kmxgit.git`
* Change directory with `cd kmxgit`
* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.setup`
* Install `bin/*` into `/usr/local/bin`
* Start Phoenix endpoint with `mix phx.server` or inside IEx with
`iex -S mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
### Public access
To setup public access repositories on HTTP or HTTPS you need to setup
your web server to serve certain requests with
[git-http-backend](https://git-scm.com/docs/git-http-backend).
#### Nginx setup
First you need to setup
[fcgiwrap](https://www.nginx.com/resources/wiki/start/topics/examples/fcgiwrap/) to serve on `127.0.0.1:9001`.
Then in your nginx server config :
```
location ~ ^(.*/info/refs|.*/git-upload-pack)$ {
fastcgi_pass 127.0.0.1:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/libexec/git/git-http-backend;
fastcgi_param GIT_PROJECT_ROOT ~git;
fastcgi_param PATH_INFO $1;
}
```
# TODO
## kmxgit v0.2
- auth
- DONE auth users using `phx.gen.auth`
- DONE change password in separate form
- DONE session timeout (60 days)
- DONE auth with login
- DONE public repositories
- DONE option "public access ?"
- DONE routes
- DONE permissions
- DONE git-http-backend
- notification e-mails
- change login
- change e-mail
- change password
- OAuth2
- Google
- Github
- Gitlab ?
- Git features
- Tags (releases)
- Log
- Diff
# Copyright
kmxgit - git server administration
Copyright 2021 Thomas de Grivel <thoxdg@gmail.com>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.