git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git/webdav is refusing to authenticate properly.

From
PSPeter Spierenburg <ionlyusethisaddressforlists@gmail.com>
Date
Jan 12, 2009, 21:54 UTC
Message-ID
<137c54e10901121354l284f11ag675abb003fc83e93@mail.gmail.com>
Greetings,

I'm trying to push a local git repository to a remote site using WebDAV, but it is eating my lunch.

My first attempt includes a username but no password in the url:
$ git-config remote.upload.url
http://peter@spierepf.dyndns.org/git/ToastMeister.git/
$ git push upload master
Fetching remote heads...
  refs/
  refs/tags/
  refs/heads/
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   0f5f3df5e289b5696d7319dcfabc2383192f306a
Unable to create branch path
http://peter@spierepf.dyndns.org/git/ToastMeister.git/refs
Unable to lock remote branch refs/heads/master
error: failed to push some refs to
'http://peter@spierepf.dyndns.org/git/ToastMeister.git/'

What surprises me here is that git never asks for a password, so naturally, my apache webserver will refuse the request:

==> /var/log/apache2/access.log <== 208.38.1.1 - - [12/Jan/2009:11:52:07 -0700] "PROPFIND /git/ToastMeister.git/ HTTP/1.1" 207 569 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:08 -0700] "HEAD /git/ToastMeister.git/info/refs HTTP/1.1" 404 - "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:08 -0700] "HEAD /git/ToastMeister.git/objects/info/packs HTTP/1.1" 404 - "-" "git/1.5.6.3"

==> /var/log/apache2/error.log <== [Mon Jan 12 11:52:08 2009] [error] [client 208.38.1.1] File does not exist: /var/www/git/ToastMeister.git/info/refs [Mon Jan 12 11:52:08 2009] [error] [client 208.38.1.1] File does not exist: /var/www/git/ToastMeister.git/objects/info/packs

==> /var/log/apache2/access.log <== 208.38.1.1 - - [12/Jan/2009:11:52:08 -0700] "PROPFIND /git/ToastMeister.git/refs/ HTTP/1.1" 207 2587 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:08 -0700] "PROPFIND /git/ToastMeister.git/refs/tags/ HTTP/1.1" 207 933 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:08 -0700] "PROPFIND /git/ToastMeister.git/refs/heads/ HTTP/1.1" 207 934 "-" "git/1.5.6.3" 208.38.1.1 - peter [12/Jan/2009:11:52:08 -0700] "MKCOL /git/ToastMeister.git/refs HTTP/1.1" 401 598 "-" "git/1.5.6.3"

==> /var/log/apache2/error.log <== [Mon Jan 12 11:52:08 2009] [warn] [client 208.38.1.1] [12697] auth_ldap authenticate: user peter authentication failed; URI /git/ToastMeister.git/refs [Empty password not allowed][Invalid credentials] [Mon Jan 12 11:52:08 2009] [error] [client 208.38.1.1] user peter: authentication failure for "/git/ToastMeister.git/refs": Password Mismatch

So next, I'll try adding a password to the URL:
$ git-config remote.upload.url
http://peter:<secret>@spierepf.dyndns.org/git/ToastMeister.git/
$ git push upload master
Fetching remote heads...
  refs/
  refs/tags/
  refs/heads/
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   0f5f3df5e289b5696d7319dcfabc2383192f306a
Unable to create branch path
http://peter:<secret>@spierepf.dyndns.org/git/ToastMeister.git/refs
Unable to lock remote branch refs/heads/master
error: failed to push some refs to
'http://peter:<secret>@spierepf.dyndns.org/git/ToastMeister.git/'
>From the client side, the result appears identical, but on the server:

==> /var/log/apache2/access.log <== 208.38.1.1 - - [12/Jan/2009:11:52:50 -0700] "PROPFIND /git/ToastMeister.git/ HTTP/1.1" 207 581 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:50 -0700] "HEAD /git/ToastMeister.git/info/refs HTTP/1.1" 404 - "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:51 -0700] "HEAD /git/ToastMeister.git/objects/info/packs HTTP/1.1" 404 - "-" "git/1.5.6.3"

==> /var/log/apache2/error.log <== [Mon Jan 12 11:52:50 2009] [error] [client 208.38.1.1] File does not exist: /var/www/git/ToastMeister.git/info/refs [Mon Jan 12 11:52:51 2009] [error] [client 208.38.1.1] File does not exist: /var/www/git/ToastMeister.git/objects/info/packs

==> /var/log/apache2/access.log <== 208.38.1.1 - - [12/Jan/2009:11:52:51 -0700] "PROPFIND /git/ToastMeister.git/refs/ HTTP/1.1" 207 2587 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:51 -0700] "PROPFIND /git/ToastMeister.git/refs/tags/ HTTP/1.1" 207 933 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:51 -0700] "PROPFIND /git/ToastMeister.git/refs/heads/ HTTP/1.1" 207 934 "-" "git/1.5.6.3" 208.38.1.1 - peter [12/Jan/2009:11:52:51 -0700] "MKCOL /git/ToastMeister.git/refs HTTP/1.1" 301 458 "-" "git/1.5.6.3" 208.38.1.1 - - [12/Jan/2009:11:52:51 -0700] "MKCOL /git/ToastMeister.git/refs/ HTTP/1.1" 401 598 "-" "git/1.5.6.3"

It looks like the client is attempting to create a collection that already exists, gets redirected (301 - Moved Permanently), forgets to authenticate on the next request, gets denied (401 - Unauthorized), and gives up.

Any idea why this is happening?
Peter-Frank Spierenburg.
Next: Johannes Schindelin
Message 1 of 6 in “git/webdav is refusing to authenticate properly.”
  1. Peter SpierenburgJan 12, 2009
  2. Johannes SchindelinJan 12, 2009
  3. Peter SpierenburgJan 13, 2009
  4. Boyd Stephen Smith Jr.Jan 13, 2009
  5. Johannes SchindelinJan 13, 2009
  6. Boyd Stephen Smith Jr.Jan 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.