Below is the HTTP configuration for the GIT repositories. 

[root@imsgit httpd]# cat /etc/httpd/conf.d/git.conf
<VirtualHost imsgit.apac.nsn-net.net:8080>

   ServerName imsgit.apac.nsn-net.net
   DocumentRoot /imsgit/Repositories

   SetEnv GIT_PROJECT_ROOT /imsgit/Repositories
   SetEnv GIT_HTTP_EXPORT_ALL
   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>

   <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>>"
   </Location>

</VirtualHost>


For first repository "/git/imstest_1" which is using local http user 
authentication, "git push" works fine and below is http logs

10.142.201.122 - - [25/Feb/2013:12:40:58 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - - [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 200 306 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "POST 
/git/imstest_1/git-receive-pack HTTP/1.1" 200 52 "-" "git/1.8.1.3"


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 10.142.201.122 in the .netrc file; using defaults
* About to connect() to 10.142.201.122 port 8080 (#0)
*   Trying 10.142.201.122... * connected
* Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0)
> GET /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.1.3
Host: 10.142.201.122:8080
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 
http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
[root@imsgit imstest_ldap]#



HTTP logs are as below

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

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



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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to