Below is the HTTP configuration for the GIT repositories. 

[root@imsgit httpd]# cat /etc/httpd/conf.d/git.conf

   DocumentRoot /imsgit/Repositories

   SetEnv GIT_PROJECT_ROOT /imsgit/Repositories
   ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/

   <Location /git/imstest_1>
       AuthType Basic
       AuthName "GIT repository"
       AuthUserFile /imsgit/conf/users-imstest_1
       Require valid-user

   <Location /git/imstest_ldap.git>
       AuthType Basic
       AuthName "Git Authentication; User LDAP login and pwd"
       AuthBasicProvider ldap
       AuthzLDAPAuthoritative off
       AuthLDAPURL "<<Valid URL>>"
       AuthLDAPBindDN "<<Valid DN>>"
       AuthLDAPBindPassword "<<Valid password>>"


For first repository "/git/imstest_1" which is using local http user 
authentication, "git push" works fine and below is http logs - - [25/Feb/2013:12:40:58 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/" - - [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/" - anugrith [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 200 306 "-" 
"git/" - anugrith [25/Feb/2013:12:41:03 +0530] "POST 
/git/imstest_1/git-receive-pack HTTP/1.1" 200 52 "-" "git/"

But for second repo with LDAP authentication, it gives error. This was 
working fine earlier without any configuration changes.
===It does not even ask the user name!===

[root@imsgit imstest_ldap]# export GIT_CURL_VERBOSE=1
[root@imsgit imstest_ldap]# git status
# On branch master
nothing to commit, working directory clean
[root@imsgit imstest_ldap]# ls -l
total 4
-rw-r--r-- 1 root root 111 Feb 25 12:08 sysInfo.txt
[root@imsgit imstest_ldap]#

[root@imsgit imstest_ldap]# git push
* Couldn't find host in the .netrc file; using defaults
* About to connect() to port 8080 (#0)
*   Trying * connected
* Connected to ( port 8080 (#0)
> GET /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

* The requested URL returned error: 403
* Closing connection #0
error: The requested URL returned error: 403 while accessing
fatal: HTTP request failed
[root@imsgit imstest_ldap]#

HTTP logs are as below

==> error_log <==
[Mon Feb 25 12:40:04 2013] [error] [client] Service not 
enabled: 'receive-pack'

==> access_log <== - - [25/Feb/2013:12:40:04 +0530] "GET 
/git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1" 403 - 
"-" "git/"

Your help on this would be highly appreciated. 

Thanks in advance.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to