Talk:Download from Git

Jump to: navigation, search

About this board

Edit description
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Spas.Z.Spasov (talkcontribs)

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

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git
cd extensions
git submodule update --init --recursive

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

$ git submodule update --init --recursive
Cloning into 'Notifications'...
Username for 'https://gerrit.wikimedia.org': Spas.Z.Spasov
Password for 'https://Spas.Z.Spasov@gerrit.wikimedia.org':
remote: Unauthorized
fatal: Authentication failed for 'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Notifications.git/'
fatal: clone of 'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Notifications.git' 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.

Reply to "Problem with 'git submodule update'"
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!
80.197.69.174 (talkcontribs)

great tip to put in --depth=1 - I haven't investigated much, but i do:

git clone --depth=1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git
Reply to "Download not for development"
91.65.247.81 (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.

91.65.247.81 (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+???

91.65.247.81 (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.

91.65.247.81 (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.

91.65.247.81 (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?

91.65.247.81 (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 ... ????"
Purodha (talkcontribs)

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

       git clone ssh://purodha@gerrit.wikimedia.org:29418/mediawiki/skins.git
       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

4
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)

Didn't the Using_Git_to_download_MediaWiki_skins part help? Or is it not obvious enough that you are supposed to download the skins this way? (Too late/in the wrong section?)

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"
Jidanni (talkcontribs)

Say how to remove an extension too.

2nd (talkcontribs)

Just remove extension folder and require_once from LocalSettings.php, that's all.

Reply to "Say how to remove an extension"

Say how to update a SINGLE extension

2
Jidanni (talkcontribs)

Say how to update a SINGLE extension too.

2nd (talkcontribs)

Cd to ext

cd extensions/abcExtension/

If need watch diff

git fetch origin
git diff HEAD origin/master
git merge origin/master

Or immediately apply changes

git pull origin master
Reply to "Say how to update a SINGLE extension"

Trying to update Mediawiki using Git. Have I misunderstood Git?

2
Craig Mackay (talkcontribs)

Hi,

I'm looking for a little help please. My mediawiki installation is located in the following directory: "public_html/w" I have Git installed on my server and I have managed to clone the git repository to "public_html/w/core" using "git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git". I was then able to switch to the current stable version, 1.22 using "git checkout -b REL1_22 origin/REL1_22".

I was under the impression that I would then be able to use the repository to update my Mediawiki installation (currently 1.21.2) but I can't seem to figure that out. Do I have to manually copy the files from the repository and then run update.php? Have I misunderstood what Git can be used for? How can I do this? I also tried cloning the repository into "public_html/w" by using "git clone https://gerrit.wikimedia.org/r/p/mediawiki/w.git" but it results in an error because the folder isn't empty.

I would really appreciate any help you can give as I think it will be so much easier for me being able to switch between versions using Git.

Regards Craig

2.121.17.2 (talkcontribs)

Nevermind, I figured it out. I was having issues with file ownership and permissions on my server. Everything is functioning as it should now.

Reply to "Trying to update Mediawiki using Git. Have I misunderstood Git?"