基于dulwich lib的python git web服务器
simplegitweb的Python项目详细描述
simplegitweb
一个基于dulwich库的python git web服务器。
安装
python setup.py install
or pip install simplegitweb
then find and run bash script "simplegitweb/systemd/install_service.sh" install systemd service
使用
gitwebserver.py
fromsimplegitwebimportgitwebserverasgitwebif__name__=='__main__':gitweb.main()
simplegitweb.conf
[DEFAULT]scanpath= /opt/simplegitweb/ listen_address=127.0.0.5 port=3000
python gitwebserver.py --config simplegitweb.conf
使用浏览器浏览此default address可以添加项目。
Caddy代理示例
https://example.com { proxy / http://127.0.0.5:3000 basicauth / 'your name''password' tls example@example.com }