If you consider "How do programs like gitolite work?", gitolite is just an authorization layer, meaning a script which:
- takes as input a git command and a user id
- gives as output an ok or denied (if ok, calls the git command)
So gitolite itself won't allow a login with username/password (or ssh for that matter).
Only the listener you put in front of git/gitolite will ask for said username/password and will check its account validity.
Or you can use an sshd listener if you want to work with public/private key, but the idea is the same.
See "Using LDAP as auth method to manage git repositories": if you put an Apache or NGiNX, those web servers can query an LDAP server and ask/check those credentials.
That is the authentication step.
Then you would need to link them to gitolite (not git) for the authorization step,
like I do in this Apache configuration file
ScriptAlias /hgit/ @H@/sbin/gitolite-shell/ # <=== calls gitolite.
SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"
gitolite will need GIT_HTTP_BACKEND
in order to call git properly.
Note that, as I explained in "Distributed Version Control Systems and the Enterprise - a Good mix?", git alone doesn't care and doesn't deal with authentication/authorization.
Hence the listener you put in front of it.