Page MenuHomePhabricator

First clone for a repository from gitblit fails with HTTP 405
Closed, ResolvedPublic

Description

This is weird, but reproducible. The *first* time you try to clone a repository in a directory with:

git clone https://git.wikimedia.org/git/mediawiki/extensions/SomeExtension.git

it fails with:

Cloning into 'SomeExtension'...
error: RPC failed; result=22, HTTP code = 405
fatal: The remote end hung up unexpectedly

The second time, it succeeds. I've reproduced it with multiple extensions (e.g. UploadWizard) on both Labs and my own machine.


Version: wmf-deployment
Severity: normal
Whiteboard: aklapper-moreinfo

Details

Reference
bz54417

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:07 AM
bzimport added projects: Gerrit, TestMe.
bzimport set Reference to bz54417.
bzimport added a subscriber: Unknown Object (MLST).

I can reproduce that as well. And yes, it is weird.
It seems however that only cloning from gitblit is affected. Cloning
directly from gerrit works as expected:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll

Is anyone actually looking into this?

Same here.

The Git Repos that start with gerrit.wikimedia.org work fine, just those at git.wikimedia.org are not working.

Huh? How could a POST request become a GET request? Some sort of Varnish misconfiguration?

POST /git/mediawiki/extensions/AssertEdit.git/git-upload-pack HTTP/1.1
User-Agent: git/1.8.4
Host: git.wikimedia.org
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 324

006fwant 8042c39f1df86789e50f04712c15a1c219dbb178 multi_ack_detailed no-done side-band-64k thin-pack ofs-delta
0032want 045a6acef5ad87bfa6a580c2b09295e5d761105c
0032want 523feba3de364984f5b099a5ea029254c9c4df23
0032want 76271fbc23b797b0c3340733e91432ac9154d44e
0032want 8042c39f1df86789e50f04712c15a1c219dbb178
00000009done
HTTP/1.1 405 HTTP method GET is not supported by this URL
Pragma: no-cache
Content-Type: text/html;charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Server: Jetty(7.6.8.v20121106)
Content-Length: 1490
Accept-Ranges: bytes
Date: Thu, 26 Sep 2013 07:13:13 GMT
X-Varnish: 1193742703
Age: 0
Via: 1.1 varnish
Connection: keep-alive
X-Cache: cp1044 miss (0)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 405 HTTP method GET is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /git/mediawiki/extensions/AssertEdit.git/git-upload-pack. Reason:
<pre> HTTP method GET is not supported by this URL</pre></p><hr /><i><small>Powered by Jetty://</small>
[...]

(In reply to Matthew Flaschen from comment #0)

The *first* time you try to clone a repository in a directory with:
git clone
https://git.wikimedia.org/git/mediawiki/extensions/SomeExtension.git
it fails with:

Cloning into 'SomeExtension'...
error: RPC failed; result=22, HTTP code = 405
fatal: The remote end hung up unexpectedly

Tried in a separate local tmp directory and had no problems.
Does anybody still see this problem? (Or: What am I doing wrong?)

$:andre\> git clone https://git.wikimedia.org/git/mediawiki/extensions/AbuseFilter.gitCloning into 'AbuseFilter'...
remote: Counting objects: 1022, done
remote: Finding sources: 100% (897/897)
remote: Getting sizes: 100% (618/618)
remote: Compressing objects: 99% (667197/667198)
remote: Total 8858 (delta 32), reused 7967 (delta 0)
Receiving objects: 100% (8858/8858), 22.07 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (5990/5990), done.
Checking connectivity... done.
$:andre\> git clone https://git.wikimedia.org/git/mediawiki/extensions/UploadWizard.git
Cloning into 'UploadWizard'...
remote: Counting objects: 1528, done
remote: Finding sources: 100% (1424/1424)
remote: Getting sizes: 100% (1061/1061)
remote: Compressing objects: 99% (678617/678618)
remote: Total 10560 (delta 92), reused 9136 (delta 0)
Receiving objects: 100% (10560/10560), 32.83 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (7141/7141), done.
Checking connectivity... done.
$:andre\>

Seems to be fixed. I tested with one I'm pretty sure has never been on my machine, and it worked on the first try for me too.