Hash :
838e9624
Author :
Thomas de Grivel
Date :
2021-12-14T10:44:56
kmxgit is a Git server written in C and Elixir.
Please see git-auth README.md.
git clone https://git.kmx.io/kmx.io/kmxgit.git
cd kmxgit
mix deps.get
mix ecto.setup
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;
}
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
# kmxgit
[kmxgit](https://git.kmx.io/kmx.io/kmxgit) is a Git server written in C
and Elixir.
## Installation
### git-auth installation
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`
* 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;
}
```