nginx + gitolite with http

138 views
Skip to first unread message

Jeffrey Layanto

unread,
Jan 15, 2021, 8:11:49 PM1/15/21
to gitolite

Not a lot of documentation on gitolite with http. Hoping to get some help here.

This is what I am trying to do:
1. set up docker image with nginx and gitolite with access to git repo via  http only (no ssh).
2. Once I get #1 above, I would like to set up docker-compose with vouch-proxy (https://github.com/vouch/vouch-proxy) handling the authentication part and then pass the authenticated username to gitolite.

With #1 above, I took a few short cuts for now:
- gitolite, nginx, perl fcgi all running as nginx user
- the REMOTE_USER passed by nginx to gitolite is hardcoded to admin (the user I used when running gitolite setup)

I can browse to http://server/git and this is what I get.
hello admin, this is httpd@8e792625effb running gitolite3 3.6.11 on git 2.24.3
R W gitolite-admin
R W testing

But if I try to run git clone http://server/git/gitolite-admin.git, I get this error
Cloning into 'gitolite-admin'...
remote: An error occurred while reading CGI reply (no response received)
fatal: unable to access 'http://server/git/gitolite-admin.git/': The requested URL returned error: 502

Not sure where to go from here.

Jeffrey Layanto

unread,
Jan 15, 2021, 11:10:04 PM1/15/21
to gitolite
Turns out git-http-backend is missing from the git installed with alpine Docker. Need to install via apk add git-daemon.

Also looks like vouch-proxy won't work as I think git client will only work with http basic auth. Maybe this will work - https://github.com/pinepain/ldap-auth-proxy.
Reply all
Reply to author
Forward
0 new messages