Simple Git Smart HTTP Server (using git-http-backend) written in Go.
See: https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP
- Cross-platform
- Simple and lightweight
- Support HTTP authentication (Basic and Digest)
- Support TLS
- I don't want to open SSH only for Git access.
- I don't want to use rich HTTP servers (such as Apache, nginx, etc.) only for Git.
- I don't want to change owner of repositories to the httpd user (such as httpd, www-data, etc.)
- I want to launch easily without any complex installation and configuration.
- Git (including git-http-backend)
Use go get
or just download binary releases.
go get github.com/pasela/git-cgi-server
git-cgi-server [OPTIONS] [REPOS_DIR]
Export all repositories:
git-cgi-server --export-all /path/to/repos
Enable Basic authentication:
git-cgi-server --basic-auth-file=/path/to/.htpasswd --auth-realm=MyGitRepos /path/to/repos
Use TLS:
git-cgi-server --cert-file=/path/to/server.crt --key-file=/path/to/server.key /path/to/repos
See git-cgi-server -h
for more options.
You can also serve git-cgi-server with reverse proxy.
Apache example: /etc/httpd/conf.d/git.conf
# Git Smart HTTP
ProxyPass /git http://localhost:10789/git
ProxyPassReverse /git http://localhost:10789/git
git-cgi-server" \
--addr=:10789 \
--digest-auth-file=/path/to/.htdigest \
--auth-realm=Git \
--uri-prefix=/git/ \
--export-all \
/path/to/repos
Apache 2.0 License
Yuki (a.k.a. pasela)