Topic on Extension talk:JSBreadCrumbs

git clone doesn't put extension into the needed directory name

5
Tenbergen (talkcontribs)

Cool extension, thank you for putting it together! I installed this via git clone from https://gerrit.wikimedia.org/g/mediawiki/extensions/JSBreadCrumbs because that's the easiest way to record it in my install script. The directory it pulls into is not named as it should be for the extension name. It's a small problem, I know how to rename it, but it took me a few minutes to figure out why it wasn't working. So, if it would be easy to change, that would be an improvement. Thanks!

Cindy.cicalese (talkcontribs)

Hi :-) What is the name of the directory that it pulls into? What is the exact git clone command you used? It works as expected for me.

Tenbergen (talkcontribs)

Hi Cindy! Sorry, I should have been more specific. I was cloning from Github. If I run

git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs

it clones into

mediawiki-extensions-JSBreadCrumbs

I was cloning from Github because cloning from gerrit as per the instructions on the top of the page didn't work for me. There it says

git clone ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JSBreadCrumbs

and if I try that I get an error

Cloning into 'JSBreadCrumbs'...
XXXXX@gerrit.wikimedia.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I have looked back at how I get other extensions, and I can get them from gerrit, but I need to use

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

and if I use that it clones to the correct directory. Would it make sense to change the instructions at the top of the repo page so they use that?

Cindy.cicalese (talkcontribs)

If you want to clone into a directory with a different name from the last segment of the path, you just add another parameter with the name of the directory:


git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs JSBreadCrumbs


Unfortunately, those instructions on gerrit are not editable by me. Perhaps Template:ExtensionInstall on mediawiki.org could be expanded to add instructions for downloading from git.

Tenbergen (talkcontribs)

Good idea. Will have posted a comment at Template talk:ExtensionInstall#Installing / downloading. And since I was there I added another issue I recently encountered right below that one. Thanks for sending me in the right direction.

Too bad you can't edit the instructions on gerrit. If you don't know how (and whether at all) that would get changed it's probably unchangable. And who knows, maybe those who actually develop this need the syntax to be that way for other reasons...

Reply to "git clone doesn't put extension into the needed directory name"