Talk:Download from Git

Jump to navigation Jump to search

About this board

Problem with 'git submodule update'

Spas.Z.Spasov (talkcontribs)

I'm just trying to downloading all extensions, following this sequence:

git clone
cd extensions
git submodule update --init --recursive

The problem is that some extensions asks for authentication. I've made account in but it is 'Unauthorized' and result is:

$ git submodule update --init --recursive
Cloning into 'Notifications'...
Username for '': Spas.Z.Spasov
Password for '':
remote: Unauthorized
fatal: Authentication failed for ''
fatal: clone of '' into submodule path 'Notifications' failed

(I found that extension '2ColConflict' also make this trouble...)

Could someone help me get through this?

Jaideraf (talkcontribs)

Same problem to me. Notifications asks username and password.

Jaideraf (talkcontribs)

@Spas.Z.Spasov I did

cd extensions/
git submodule foreach 'git checkout -b REL1_28 origin/REL1_28 || :'
git submodule update --init --recursive

And now it works.

Spas.Z.Spasov (talkcontribs)

Thank you! I will try it these days. And will report also.

Why "install-dir" are translatable?

Liuxinyu970226 (talkcontribs)

Are those "translations" of commands really work in Git softwares?

Reply to "Why "install-dir" are translatable?"

Translation: source needs update

Omotecho (talkcontribs)
Reply to "Translation: source needs update"

What external libraries that MediaWiki requires are no longer in this "core" git repository?

Orestn (talkcontribs)

The "Fetch external libraries" section states that "external libraries that MediaWiki requires are no longer in this "core" git repository".

Which libraries are no longer included?

These instructions are given to install these needed libraries "composer install --no-dev". My understanding of composer is that --no-dev tells composer to skip installing packages listed in require-dev. How then would a command that tells composer to skip installing certain packages cause it to install additional required libraries?

Orestn (talkcontribs)

Ah, I hadn't paid attention to the part in the documentation that says "switch to your core directory" before running composer install.

I had been running "composer install" in the project root folder. This folder has a composer.json which requires mediawiki/core.

I see now that there is another composer.json file in the vendor/mediawiki/core folder and that running composer install in this folder brings in additional libraries.

I still don't understand why running composer install at the project root doesn't resolve all dependencies when it installs mediawiki/core.

Legoktm (talkcontribs)

> I had been running "composer install" in the project root folder. This folder has a composer.json which requires mediawiki/core.

What is your project root folder? Where did you get this folder from, and why does it have a composer.json that requires "mediawiki/core"??

Reply to "What external libraries that MediaWiki requires are no longer in this "core" git repository?" (talkcontribs)

I cloned several extensions into .../extensions. Thereafter I tried to be a real smart ass by trying to switch all of them to the 1.23 branch. I did as instructed "git submodule update --init --recursive" followed by "git submodule foreach 'git checkout -b REL1_23 origin/REL1_23 || :" The I run update.php and get the following message: This version of the CharInsert extension requires MediaWiki 1.25+. That's awesome but does not help me since I want to do 1.23. Any hint appreciated. (talkcontribs)

Even if I go to /extensions/CharInsert and do "git checkout -b REL1_23 origin/REL1_23" the update.php script tells me This version of the CharInsert extension requires MediaWiki 1.25+??? (talkcontribs)

I just found out that I messed something with CharInsert while trying to to what is described in my first post. So if I do "git checkout -b REL1_23 origin/REL1_23" in every exension's folder I am cool. So how do I save time and do it for all of them in one go. This will be great. (talkcontribs)

The internet tells me to do something like "git submodule foreach --recursive git checkout -b REL1_23 origin/REL1_23" This does not work either. Still looking for a solution to not having to do it for say 50 extensions ... or is it that git is just a flawed system. There must be a trick I guess. (talkcontribs)

Probably this only works if you download the whole lot of extensions and not an isolated set of say 50. I guess git is funny ha ha Let's do the solos :)

MarkAHershberger (talkcontribs)

It doesn't sound like you used submodules to initially install the extensions, did you? (talkcontribs)

No I did not, but did not realize this in the heat of the action. There should be a note about it.

MarkAHershberger (talkcontribs)

I just used the exact commands you gave and successfully set up gerrit. In fact, I did

   $ cd skins; git submodule foreach git review -s

and had success. Well, it did fail on the WPtouch skin, for some reason, but setting the gerrit remote in that directory manually allowed it to continue.

To set the gerrit remote in that directory:

   $ cd WPTouch; git remote add gerrit URL
Reply to "So how do I ... ????"
Frimelle (talkcontribs)

I was recently installing MediaWiki with someone who did it for the first time. The skins part was what I saw them struggling most with.

I think that's mainly because:

  • It's so late in the manual
  • It doesn't mention anywhere before you'll have to install skins (if it's supposed to stay where it is, it should be mentioned before that the step is necessary)
  • The section itself links to another tutorial, for beginners it would be nicer to have a quick "How to set up the Vector skin and here is a link to how to work with all the other skins if you know what they do already"

I would like to change it in the way suggested but am open for feedback. Therefore I thought I mention it here and see if there are other/opposing opinions.

BDavis (WMF) (talkcontribs)

The proposed changes sound reasonable to me. Many of our docs are written by people with very deep knowledge of how our software is intended to be used. That perspective often leads to docs that very precisely correct but not necessarily easy to follow. Copy editing always welcome! The worst thing that could possibly happen is a revert. :)

Reply to "Download skins section"
Jidanni (talkcontribs)
  • User sees section 'Download for development'.
  • User wants section 'Download not for development'.
  • User researches the advice "git clone --depth 1, then e.g., git pull (--depth=1 too?) monthly".
  • After several years user finds du -sh showing
1.5G    mediawiki/
1.4G    mediawiki/.git
  • User does not need history filling up his disks! (talkcontribs)
Reply to "Download not for development"

Using Git to download MediaWiki skins

Purodha (talkcontribs)

If you want to download all skins for development, one might be tempted to:

       git clone ssh://
       cd skins
       git review -s
       git submodule update --init --recursive

That creates a set of files but they cannot be used to submit amendments. If you try:

       cd <someskin>
       git review -s

you get:

       Problems encountered installing commit-msg hook
       /.../<someskin>/.git/hooks/commit-msg: Not a directory
       protocol error: expected control record

and attempts to use:

       git review ...

so as to submit patches yields similar error messages.

Please document a correct working way to solve the problem.

Reply to "Using Git to download MediaWiki skins"

Skin installation: do not checkout master branch

FelixKaiser (talkcontribs)

I've just upgrated to version 1.24 from 1.22. Do do so I needed to install a skin, since it doesn't come with MW. I've spent 3 hours fixing an error in Vector's skin display, because the guide tells you to install the master branch only.

I've now however understand that for the skin also, one should install the REL1_24 branch, using git checkout -b REL1_24 origin/REL1_24

It seems at this time, the master branch was buggy or incompatible. If you understand the release process better than I do and think I am correct, would you be so kind to amend the documentation? Thanks.

Nemo bis (talkcontribs)

MediaWiki from Git is pretty much unusable these days, with all the dependencies. Do you have strong reasons to use Git instead of the tarball?

Frimelle (talkcontribs)
John.james (talkcontribs)

wasn't obvious to me anyway. I just spent three hours before figuring out that there were branches for the skins too. whoops. I was bold and added to the documentation.

Reply to "Skin installation: do not checkout master branch"
FelixKaiser (talkcontribs)

This guide does not talk about necessary file access rights for Mediawiki to run after installation in this way. Installing Mediawiki without these rights will not succeed, which is why I think it should be added.

Reply to "Mention access rights"