git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* RE: Failure using webdav basic auth by git client
@ 2012-11-11 18:09 Jason Pyeron
  2012-11-11 18:28 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Pyeron @ 2012-11-11 18:09 UTC (permalink / raw
  To: 'Pyeron, Jason J CTR (US)', git

I had to munge the body so the list would post it.

See: http://vger.kernel.org/majordomo-taboos.txt



> -----Original Message-----
> From: Pyeron, Jason J CTR (US)
> Sent: Thursday, November 08, 2012 2:49 PM
> To: git@vger.kernel.org
> Subject: Failure using webdav basic auth by git client
> 
> My google fu has failed me on this issue. I am trying to setup http(s)
> repositories for git. If I require authenticated users then git asks
> for a username and password for the first volley of communications, but
> then does not include the Authorization header on subsequent requests.
> 
> Below is the log if I enable username and password BASIC auth in
> Apache.
> 
> user@host /tmp/foo/test
> $ git push origin master
> trace: built-in: git 'push' 'origin' 'master'
> trace: run_command: 'git-remote-http' 'origin'
> 'http://server/git/test/'
> * Couldn't find host server in the .netrc file; using defaults
> * About to connect() to server port 80 (#0)
> *   Trying server...
> * 0x800766e8 is at send pipe head!
> * STATE: CONNECT => WAITCONNECT handle 0x8007f040; (connection #0)
> * Connected to server (server) port 80 (#0)
> * Connected to server (server) port 80 (#0)
> * STATE: WAITCONNECT => DO handle 0x8007f040; (connection #0)
> > GET /git/test/info/refs?service=git-receive-pack HTTP/1.1
> User-Agent: git/1.7.9
> Host: server
> Accept: */*
> Pragma: no-cache
> 
> * STATE: DO => DO_DONE handle 0x8007f040; (connection #0)
> * STATE: DO_DONE => WAITPERFORM handle 0x8007f040; (connection #0)
> * STATE: WAITPERFORM => PERFORM handle 0x8007f040; (connection #0)
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * The requested URL returned error: 401 Authorization Required
> * Closing connection #0
> Username for 'http://server':
> Password for 'http://test@server':
> * Couldn't find host server in the .netrc file; using defaults
> * About to connect() to server port 80 (#0)
> *   Trying server...
> * 0x800766e8 is at send pipe head!
> * STATE: CONNECT => WAITCONNECT handle 0x8007f9c0; (connection #0)
> * Connected to server (server) port 80 (#0)
> * Connected to server (server) port 80 (#0)
> * STATE: WAITCONNECT => DO handle 0x8007f9c0; (connection #0)
> > GET /git/test/info/refs?service=git-receive-pack HTTP/1.1
> User-Agent: git/1.7.9
> Host: server
> Accept: */*
> Pragma: no-cache
> 
> * STATE: DO => DO_DONE handle 0x8007f9c0; (connection #0)
> * STATE: DO_DONE => WAITPERFORM handle 0x8007f9c0; (connection #0)
> * STATE: WAITPERFORM => PERFORM handle 0x8007f9c0; (connection #0)
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 401 Authorization Required
> < Date: Fri, 02 Nov 2012 03:11:53 GMT
> < Server: Apache/2.0.52 (CentOS)
> < WWW-Authenticate: Basic realm="Git"
> < Content-Length: 479
> < Connection: close
> < C-o-n-t-e-n-t---T-y-p-e-:- -t-e-x-t-/-h-t-m-l-;-
-c-h-a-r-s-e-t-=-i-s-o---8-8-5-9---1-
> <
> * Closing connection #0
> * Issue another request to this URL:
> 'http://server/git/test/info/refs?service=git-receive-pack'
> * Couldn't find host server in the .netrc file; using defaults
> * About to connect() to server port 80 (#0)
> *   Trying server...
> * 0x800766e8 is at send pipe head!
> * STATE: CONNECT => WAITCONNECT handle 0x8007f9c0; (connection #0)
> * Connected to server (server) port 80 (#0)
> * Connected to server (server) port 80 (#0)
> * STATE: WAITCONNECT => DO handle 0x8007f9c0; (connection #0)
> * Server auth using Basic with user 'test'
> > GET /git/test/info/refs?service=git-receive-pack HTTP/1.1
> Authorization: Basic dGVzdDpwYXNzd29yZA==
> User-Agent: git/1.7.9
> Host: server
> Accept: */*
> Pragma: no-cache
> 
> * STATE: DO => DO_DONE handle 0x8007f9c0; (connection #0)
> * STATE: DO_DONE => WAITPERFORM handle 0x8007f9c0; (connection #0)
> * STATE: WAITPERFORM => PERFORM handle 0x8007f9c0; (connection #0)
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 200 OK
> < Date: Fri, 02 Nov 2012 03:11:53 GMT
> < Server: Apache/2.0.52 (CentOS)
> < Last-Modified: Thu, 01 Nov 2012 01:32:28 GMT
> < ETag: "714064-0-fdf5a300"
> < Accept-Ranges: bytes
> < Content-Length: 0
> < Connection: close
> < Content-Type: text/plain; charset=UTF-8
> <
> * STATE: PERFORM => DONE handle 0x8007f9c0; (connection #0)
> * Closing connection #0
> * Couldn't find host server in the .netrc file; using defaults
> * About to connect() to server port 80 (#0)
> *   Trying server...
> * 0x800766e8 is at send pipe head!
> * STATE: CONNECT => WAITCONNECT handle 0x80076678; (connection #0)
> * Connected to server (server) port 80 (#0)
> * Connected to server (server) port 80 (#0)
> * STATE: WAITCONNECT => DO handle 0x80076678; (connection #0)
> * Server auth using Basic with user 'test'
> > GET /git/test/HEAD HTTP/1.1
> Authorization: Basic dGVzdDpwYXNzd29yZA==
> User-Agent: git/1.7.9
> Host: server
> Accept: */*
> Pragma: no-cache
> 
> * STATE: DO => DO_DONE handle 0x80076678; (connection #0)
> * STATE: DO_DONE => WAITPERFORM handle 0x80076678; (connection #0)
> * STATE: WAITPERFORM => PERFORM handle 0x80076678; (connection #0)
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 200 OK
> < Date: Fri, 02 Nov 2012 03:11:53 GMT
> < Server: Apache/2.0.52 (CentOS)
> < Last-Modified: Thu, 01 Nov 2012 01:23:43 GMT
> < ETag: "704053-17-deaac5c0"
> < Accept-Ranges: bytes
> < Content-Length: 23
> < Connection: close
> < Content-Type: text/plain; charset=UTF-8
> <
> * STATE: PERFORM => DONE handle 0x80076678; (connection #0)
> * Closing connection #0
> trace: run_command: 'http-push' '--helper-status'
> 'http://server/git/test/' 'refs/heads/master:refs/heads/master'
> trace: exec: 'git' 'http-push' '--helper-status'
> 'http://server/git/test/' 'refs/heads/master:refs/heads/master'
> trace: exec: 'git-http-push' '--helper-status'
> 'http://server/git/test/' 'refs/heads/master:refs/heads/master'
> trace: run_command: 'git-http-push' '--helper-status'
> 'http://server/git/test/' 'refs/heads/master:refs/heads/master'
> * Couldn't find host server in the .netrc file; using defaults
> * About to connect() to server port 80 (#0)
> *   Trying server...
> * 0x8006f558 is at send pipe head!
> * STATE: CONNECT => WAITCONNECT handle 0x80077e58; (connection #0)
> * Connected to server (server) port 80 (#0)
> * Connected to server (server) port 80 (#0)
> * STATE: WAITCONNECT => DO handle 0x80077e58; (connection #0)
> > PROPFIND /git/test/ HTTP/1.1
> User-Agent: git/1.7.9
> Host: server
> Accept: */*
> Depth: 0
> Content-Type: text/xml
> Content-Length: 159
> Expect: 100-continue
> 
> * STATE: DO => DO_DONE handle 0x80077e58; (connection #0)
> * STATE: DO_DONE => WAITPERFORM handle 0x80077e58; (connection #0)
> * STATE: WAITPERFORM => PERFORM handle 0x80077e58; (connection #0)
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 100 Continue
> * additional stuff not fine /usr/src/ports/curl/curl-7.27.0-1/src/curl-
> 7.27.0/lib/transfer.c:1037: 0 0
> * We are completely uploaded and fine
> * The requested URL returned error: 401 Authorization Required
> * Closing connection #0
> * Expire cleared
> error: Cannot access URL http://server/git/test/, return code 22
> fatal: git-http-push failed
> 
> 
> Disabling the auth requirement gives in the apache config, I have the
> full trace (quite long) available for the below upon request:
> 
> user@host /tmp/foo/test
> $ git push origin master
> To http://server/git/test/
>  * [new branch]      master -> master

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Failure using webdav basic auth by git client
  2012-11-11 18:09 Failure using webdav basic auth by git client Jason Pyeron
@ 2012-11-11 18:28 ` Jeff King
  2012-11-12 12:27   ` Pyeron, Jason J CTR (US)
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2012-11-11 18:28 UTC (permalink / raw
  To: Jason Pyeron; +Cc: 'Pyeron, Jason J CTR (US)', git

On Sun, Nov 11, 2012 at 01:09:02PM -0500, Jason Pyeron wrote:

> > My google fu has failed me on this issue. I am trying to setup http(s)
> > repositories for git. If I require authenticated users then git asks
> > for a username and password for the first volley of communications, but
> > then does not include the Authorization header on subsequent requests.
> [...]
> > > GET /git/test/info/refs?service=git-receive-pack HTTP/1.1
> > User-Agent: git/1.7.9

Can you try with a more recent git version? There were some bugs with
on-demand http auth when using the dumb protocol (which I see you are
using). They were fixed in v1.7.10.2 and higher.

Also, consider setting up the smart-http protocol, as it is way more
efficient.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Failure using webdav basic auth by git client
  2012-11-11 18:28 ` Jeff King
@ 2012-11-12 12:27   ` Pyeron, Jason J CTR (US)
  0 siblings, 0 replies; 3+ messages in thread
From: Pyeron, Jason J CTR (US) @ 2012-11-12 12:27 UTC (permalink / raw
  To: git@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

> -----Original Message-----
> From: Jeff King 
> Sent: Sunday, November 11, 2012 1:29 PM
> 
> On Sun, Nov 11, 2012 at 01:09:02PM -0500, Jason Pyeron wrote:
> 
> > > My google fu has failed me on this issue. I am trying to setup
> http(s)
> > > repositories for git. If I require authenticated users then git
> asks
> > > for a username and password for the first volley of communications,
> but
> > > then does not include the Authorization header on subsequent
> requests.
> > [...]
> > > > GET /git/test/info/refs?service=git-receive-pack HTTP/1.1
> > > User-Agent: git/1.7.9
> 
> Can you try with a more recent git version? There were some bugs with
> on-demand http auth when using the dumb protocol (which I see you are
> using). They were fixed in v1.7.10.2 and higher.

Having some troubles compiling the maint branch on cygwin (same issue for master).


> 
> Also, consider setting up the smart-http protocol, as it is way more
> efficient.

Will look into that after I get git compiling...


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5615 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-12 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-11 18:09 Failure using webdav basic auth by git client Jason Pyeron
2012-11-11 18:28 ` Jeff King
2012-11-12 12:27   ` Pyeron, Jason J CTR (US)

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).