Hello,

This is the apache configuration file for 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.


























imstest_1/:
total 32
drwxr-xr-x  2 apache apache 4096 Jan 21 15:58 branches
-rw-r--r--  1 root   root     66 Feb  5 12:16 config
-rw-r--r--  1 apache apache   73 Jan 21 15:58 description
-rw-r--r--  1 apache apache   23 Jan 21 15:58 HEAD
drwxr-xr-x  2 apache apache 4096 Jan 21 16:00 hooks
drwxr-xr-x  2 apache apache 4096 Feb 25 12:41 info
drwxr-xr-x 98 apache apache 4096 Feb 25 12:41 objects
drwxr-xr-x  4 apache apache 4096 Jan 21 15:58 refs

imstest_1/branches:
total 0

imstest_1/hooks:
total 36
-rwxr-xr-x 1 apache apache  452 Jan 21 15:58 applypatch-msg.sample
-rwxr-xr-x 1 apache apache  896 Jan 21 15:58 commit-msg.sample
-rwxr-xr-x 1 apache apache  189 Jan 21 15:58 post-update
-rwxr-xr-x 1 apache apache  398 Jan 21 15:58 pre-applypatch.sample
-rwxr-xr-x 1 apache apache 1704 Jan 21 15:58 pre-commit.sample
-rwxr-xr-x 1 apache apache 1239 Jan 21 15:58 prepare-commit-msg.sample
-rwxr-xr-x 1 apache apache 4951 Jan 21 15:58 pre-rebase.sample
-rwxr-xr-x 1 apache apache 3611 Jan 21 15:58 update.sample

imstest_1/info:
total 8
-rw-r--r-- 1 apache apache 240 Jan 21 15:58 exclude
-rw-r--r-- 1 apache apache 307 Feb 25 12:41 refs

imstest_1/objects:
total 384
drwxr-xr-x 2 apache apache 4096 Jan 21 18:25 00
drwxr-xr-x 2 apache apache 4096 Jan 21 18:04 05
drwxr-xr-x 2 apache apache 4096 Feb 25 12:41 07
drwxr-xr-x 2 apache apache 4096 Feb  7 11:22 0d
drwxr-xr-x 2 apache apache 4096 Jan 21 16:55 11
drwxr-xr-x 2 apache apache 4096 Feb  5 12:23 13
drwxr-xr-x 2 apache apache 4096 Feb  4 12:33 14
drwxr-xr-x 2 apache apache 4096 Feb  5 12:39 18
drwxr-xr-x 2 apache apache 4096 Feb  5 12:39 19
drwxr-xr-x 2 apache apache 4096 Feb 25 12:41 1a
drwxr-xr-x 2 apache apache 4096 Jan 31 16:38 1b
drwxr-xr-x 2 apache apache 4096 Feb 21 12:59 1d
drwxr-xr-x 2 apache apache 4096 Jan 30 17:30 1e
drwxr-xr-x 2 apache apache 4096 Feb 21 12:59 1f


imstest_1/objects/00:
total 4
-r--r--r-- 1 apache apache 131 Jan 21 18:25 
ce5f01c3e2e5d8b9b970aed170418563e37932

imstest_1/objects/05:
total 4
-r--r--r-- 1 apache apache 155 Jan 21 18:04 
2f5b8ef296f722243ae1d9d931a988e9bbb330

imstest_1/objects/07:
total 4
-r--r--r-- 1 apache apache 106 Feb 25 12:41 
27dfc09ea760f5af2fb363ca06627e5876d591

imstest_1/objects/0d:
total 4
-r--r--r-- 1 apache apache 236 Feb  7 11:22 
2a820fe2f821f3991aacb30374f57c664a953b

imstest_1/objects/11:
total 4
-rw-r--r-- 1 apache apache 156 Jan 21 16:55 
511b57cbf53879db128e7a3778106e26649880

imstest_1/objects/13:
total 8
-r--r--r-- 1 apache apache 309 Feb  5 12:23 
6b9812adb1e7086b3367443ad1f46b4b537078
-r--r--r-- 1 apache apache 174 Jan 22 12:12 
b12fb08e2421b977ff3ee4739727375c8f3b8a

imstest_1/objects/14:
total 4
-r--r--r-- 1 apache apache 276 Feb  4 12:33 
9c3d47aab1c5a29ead78df4a43aad49b45f8e1

imstest_1/objects/18:
total 4
-r--r--r-- 1 apache apache 61 Feb  5 12:39 
a7e664d48483250624cd42f8ba10ec01bc4498

imstest_1/objects/19:
total 4
-r--r--r-- 1 apache apache 309 Feb  5 12:39 
9fc08c79508f52cc5c89cccae3e5e019876d28



imstest_1/objects/info:
total 4
-rw-r--r-- 1 apache apache 1 Feb 25 12:41 packs

imstest_1/objects/pack:
total 0

imstest_1/refs:
total 8
drwxr-xr-x 3 apache apache 4096 Feb 25 12:41 heads
drwxr-xr-x 2 apache apache 4096 Feb  5 14:07 tags

imstest_1/refs/heads:
total 4
-rw-r--r-- 1 apache apache 41 Feb 25 12:41 master

imstest_1/refs/tags:
total 8
-rw-r--r-- 1 apache apache 41 Feb  5 14:07 ims_8.2ep2
-rw-r--r-- 1 apache apache 41 Feb  5 14:07 ims_9.0


-- 
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