Re: [git-users] git push throws error

2013-02-26 Thread anugrith . v
Thanks a lot for that hint Konstantin. 

It was a basic issue and a human error.

Below entry was commented out in HTTP configuration file. So, it was not 
even asking the user name and it breaks. 
   *Require valid-user*

Thanks a lot once again...

On Tuesday, February 26, 2013 4:57:50 PM UTC+5:30, Konstantin Khomoutov 
wrote:
>
> On Mon, 25 Feb 2013 22:47:15 -0800 (PST) 
> anugr...@gmail.com  wrote: 
>
> [...] 
> > I am getting error while pushing the committed changes in GIT 
> > repository using LDAP authentication. 
> > [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]# 
>
> Note that if authentication was really enabled on the server, you'd 
> receive "401 Unauthorized" and a header (or headers) listing available 
> authentication mechanisms. 
> Instead, the server just rejected the request with 403. 
>
> > 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" 
>
> As usually, I googled for the precise error message and towards the end 
> of [1] I read: 
>
>   If you see this in Apache's error_log: 
>
> Service not enabled: 'receive-pack' 
>
>   This means that $REMOTE_USER isn't set — that is, user-authentication 
>   failed. Git-http-backend needs the $REMOTE_USER to be set in order to 
>   record who did the PUSH. 
>
> 1. http://paperlined.org/apps/git/SmartHTTP_Ubuntu.html 
>

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




Re: [git-users] git push throws error

2013-02-26 Thread Konstantin Khomoutov
On Mon, 25 Feb 2013 22:47:15 -0800 (PST)
anugrit...@gmail.com wrote:

[...]
> I am getting error while pushing the committed changes in GIT
> repository using LDAP authentication. 
> [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]#

Note that if authentication was really enabled on the server, you'd
receive "401 Unauthorized" and a header (or headers) listing available
authentication mechanisms.
Instead, the server just rejected the request with 403.

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

As usually, I googled for the precise error message and towards the end
of [1] I read:

  If you see this in Apache's error_log:

Service not enabled: 'receive-pack'

  This means that $REMOTE_USER isn't set — that is, user-authentication
  failed. Git-http-backend needs the $REMOTE_USER to be set in order to
  record who did the PUSH. 

1. http://paperlined.org/apps/git/SmartHTTP_Ubuntu.html

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




[git-users] git push throws error

2013-02-26 Thread anugrith . v
Hello,

I am getting error while pushing the committed changes in GIT repository 
using LDAP authentication. 

It was working fine earlier; but now even it does not ask  user name and 
password and simply fails. 

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




[git-users] "git push" throws error

2013-02-26 Thread anugrith . v
Hello,

This is the apache configuration file for GIT repositories. 

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


   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/


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

   
   AuthType Basic
   AuthName "Git Authentication; User LDAP login and pwd"
   AuthBasicProvider ldap
   AuthzLDAPAuthoritative off
   AuthLDAPURL "<>"
   AuthLDAPBindDN "<>"
   AuthLDAPBindPassword "<>"
   




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 Ja