Page MenuHomePhabricator

MediaWiki-Vagrant: git clone of mediawiki/core returns error code 128
Open, LowPublic

Description

I am trying to Install media wiki via vagrant following the instructions here https://www.mediawiki.org/wiki/MediaWiki-Vagrant

This is the error that I get https://pastebin.com/WeLai6xH

PS I have been trying to set up the vagrant install for some weeks now and I have been having errors upon errors
This was the error I had previously https://phabricator.wikimedia.org/T235909

Event Timeline

This is a git error, so hard to tell without debug output what's going on. You could try running the failed command (/usr/bin/git clone --recurse-submodules --branch 'master' --single-branch) in the vagrant box, and see what happens.

Tgr renamed this task from Error Installing mediawiki via vagrant to MediaWiki-Vagrant: git clone of mediawiki/core returns error code 128.Oct 28 2019, 7:51 AM

Hello I tried the above, looks like the Git repository is not accessible, I even tried cloning the repository outside the box as well as inside

vagrant@mediawiki:/usr/bin$ git  clone --recurse-submodules  --branch 'master' --single-branch https://phabricator.wikimedia.org/source/mediawiki.git /vagrant/mediawiki
Cloning into '/vagrant/mediawiki'...
fatal: unable to access 'https://phabricator.wikimedia.org/source/mediawiki.git/': transfer closed with outstanding read data remaining
vagrant@mediawiki:/usr/bin$ git  clone --recurse-submodules  --branch 'master' --single-branch https://phabricator.wikimedia.org/source/mediawiki.git 
fatal: could not create work tree dir 'mediawiki': Permission denied
vagrant@mediawiki:/usr/bin$ sudo git  clone --recurse-submodules  --branch 'master' --single-branch https://phabricator.wikimedia.org/source/mediawiki.git /vagrant/mediawiki
Cloning into '/vagrant/mediawiki'...
fatal: unable to access 'https://phabricator.wikimedia.org/source/mediawiki.git/': transfer closed with outstanding read data remaining
vagrant@mediawiki:/usr/bin$

From outside the box the error was the same

prondubuisi@prondubuisi:~/gitrepos$  git  clone --recurse-submodules  --branch 'master' --single-branch http://phabricator.wikimedia.org/source/mediawiki.git hello
Cloning into 'hello'...
fatal: unable to access 'http://phabricator.wikimedia.org/source/mediawiki.git/': transfer closed with outstanding read data remaining

git clone with trace gives

POST git-upload-pack (177 bytes)
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Timeout
fatal: The remote end hung up unexpectedly

Ugh.
(Also apparently it clones the entire ref/changes, despite being given the --single-branch argument. Double ugh.)

Change 546422 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Revert "Make initial MediaWiki core clone from diffusion mirror"

https://gerrit.wikimedia.org/r/546422

Cloning from Github works but still pulls all Gerrit changesets in existence (how are they even replicated there?) and ends up pulling about 1GB.
A shallow clone is 30M. I know there are various usability problems with shallow clones, but that's a drastic difference...

@bd808 any thoughts?

Use a faster network? We have been through multiple rounds over the last 4-5 years of trying to make MediaWiki-Vagrant smarter than any other instructions on-wiki about working around slow/restricted networks when using git, but it always seems like we are adding piles of complexity to the project to serve a small number of folks only a little better.

@Tgr @bd808 I don't mind the 1gb download, how do I go about pulling in the repository? thanks

I tested from a hotel wifi which is not blazing fast but better than my 4G connection (and as such probably better than what most African developers have access to), so I'd question that this only affects a small number of users (other than the userbase of Vagrant being fairly small in the first place).
Of course I might have gotten a different error than @Prondubuisi.

Change 546422 merged by jenkins-bot:
[mediawiki/vagrant@master] Revert "Make initial MediaWiki core clone from diffusion mirror"

https://gerrit.wikimedia.org/r/546422

I tested from a hotel wifi which is not blazing fast but better than my 4G connection (and as such probably better than what most African developers have access to), so I'd question that this only affects a small number of users (other than the userbase of Vagrant being fairly small in the first place).
Of course I might have gotten a different error than @Prondubuisi.

Very true, I Am just lucky I have the means to go all the way to get the 1GB download. The Internet speed is quite slow down here and the rates are expensive so a solution with a small download size will be much appreciated if we want more persons from Africa running the set up and possibly contributing

@Prondubuisi can you retry with the newest version of MediaWiki-Vagrant?

Re: reducing the download size, that's a more difficult trade-off. A shallow git clone will result in surprising behavior of you try to use git log, git blame etc (possibly also when you try to upload your own patches, I'm not 100% sure about that). I guess the question is, how many use MW-Vagrant for core development vs. other development?
In any case, you should be able to make that trade-off by issuing vagrant hiera mediawiki::git_depth 1 after installing MW-Vagrant, but before running vagrant up for the first time. (You can unshallow the repo later if you need to.) We should probably document that somewhere.

I'd question that this only affects a small number of users (other than the userbase of Vagrant being fairly small in the first place).

I do not disagree with this, but I have never seen any strong evidence that the initial clone of mediawiki/core.git problems are actually specific to MediaWiki-Vagrant. They have always seemed to be problems with Gerrit's git server and the git client. To me that means the the real thing to fix is Gerrit, and not adding hack after hack in MediaWiki-Vagrant to work around Gerrit's problems with our largest repo.

Aklapper triaged this task as Low priority.Dec 6 2022, 10:26 AM