Ldap – Git/LDAP Accounts/Gitolite

gitgitoliteldap

I have relatively little knowledge about what exactly LDAP is and how it works except that I know I can use my LDAP account username/password to log into multiple linux servers. Right now we are using mercurial for version control however I am investigating what it would take to convert to git.

Now my first question I am pretty sure I know the answer to but just want to verify (I think the answer is yes) but since git can use ssh for connecting to the repositories, as long as the LDAP account has access to the server the git repository is hosted on, I can just assume the LDAP account would act like an regular SSH account and work for connecting to the git repository, correct?

The second question I am not so sure about and that would be if LDAP can hook into gitolite so that I could gain the access control functionality that gitolite provides. I am personally fine with scratching LDAP authentication in order to get the access control that gitolite provides though I am not sure my boss is.

Best Answer

I believe NSS-LDAP will provide system level access control via LDAP. (http://www.padl.com/OSS/nss_ldap.html) As long as gitolite uses the system level NSS to determine the access control, that should be your best bet.

So the answer to both questions is "Yes, it can be done", but you will need to setup the system to accommodate (and I am fully blindly assuming gitolite uses the system level NSS)