git-http-backend on CentOS 5.5
from CentOS, Git & http-push unavailable
- install new version curl in local directory
- configure git as ./configure --with-curl=curl dir
apache settings from
- git init --bare git-repo-dir (beware of the directory permission - httpd user writable)
- git update-server-info
- in /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/git.conf
SetEnv GIT_PROJECT_ROOT git-repo-dirSetEnv GIT_HTTP_EXPORT_ALLAliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /git-repo-dir/$1AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /git-repo-dir/$1ScriptAliasMatch \"(?x)^/git/(.*/(HEAD | \info/refs | \objects/(info/[^/]+ | \[0-9a-f]{2}/[0-9a-f]{38} | \pack/pack-[0-9a-f]{40}\.(pack|idx)) | \git-(upload|receive)-pack))$" \/usr/local/libexec/git-core/git-http-backend/$1ScriptAlias /git/ /usr/local/share/gitweb/gitweb.cgi<Directory "git-repo-dir">Allow from all</Directory><LocationMatch "/git">AuthType BasicAuthName "Git"#AuthUserFile AuthFile#Require valid-userAuthBasicProvider ldapAuthLDAPURL "ldap://server:389/dc=company,dc=local?sAMAccountName?sub?(objectclass=*)" NONEAuthLDAPBindDN "cn=user,ou=team,ou=department,dc=company,dc=local"AuthLDAPBindPassword secretAuthzLDAPAuthoritative onrequire ldap-user user1 user2 user3</LocationMatch>
auth
- git clone http://server/git-repo-dir
- git clone http://username@server/git-repo-dir
- git clone http://username:password@server/git-repo-dir
- unset SSH_ASKPASS