Ldap – Using LDAP as auth method for git repositories

gitldap

I want to convince my boss that we should be using git for version control. He says, that it absolutely must authenticate users through our central LDAP server.

I looked at the various solutions (gitweb, gitorious … ) and couldn't really find a definitive answer about whether they support LDAP authentication.

The only solution I could find a little info on was a Apache+mod_ldap setting. But that would mean that the user authenticating on LDAP wouldn't necessarily be the same as the actual git user, right? (Not that this is a huge problem, but just something which would bug me.)

So, what's the best way to authenticate git users via LDAP?

Best Answer

While keys are used for most public git services, the real authentication happens via ssh. SSH is more then capable of authenticating against ldap. As far as git is concerned once you have access to the files you can go to town.

UPDATE

Git now supports (as of this year, who knew?) a smart http pushing mechanism. The old way was to use a webdav server, but both fetching and pushing were very slow and inefficient. Now you can get pretty much the same speeds over http as you would ssh:// or git://. This means you can use apache or nginx and use any http auth scheme you would like. (Ldap, database, etc.)

More info from pro git and github.

Related Topic