Talk:Gerrit/Tutorial

Jump to: navigation, search

About this board

Archive


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

add new language in welcome.py pywikibot

2
Ainur bai (talkcontribs)

good morning!

Maybe I'm turning to the wrong address, if so please direct me.

I started with the problem of adding a new language to script welcome.py in pywikibot. I created the necessary pages from the bot and added a text to the text. But I can not fix the changes

:

Git.exe push --progress "origin" master: master

Remote: Unauthorized

Fatal: Authentication failed for 'https://gerrit.wikimedia.org/r/pywikibot/core.git/ь

But I'm registered at https://gerrit.wikimedia.org/

Help me please!

Xqt (talkcontribs)

You may use the Gerrit patch uploader to upload a patch.

See also Manual:Pywikibot/Gerrit and Gerrit/TortoiseGit tutorial.

Reply to "add new language in welcome.py pywikibot"
Summary by Malyacko

Off-topic unrelated. Please do not test here.

107.0.58.212 (talkcontribs)

msmsm

IvRud (talkcontribs)

Respected Gerrit. I request assistance in implementing this [https://phabricator.wikimedia.org/T34676 request]. He already has a system of transliteration. This is to be done. Beforehand grateful.

AKlapper (WMF) (talkcontribs)

Hi, anyone interested in implementing any code changes please see How to become a MediaWiki hacker. Thanks!

Reply to "Rusyn language needs a Latin variant"
PiRSquared17 (talkcontribs)

I don't know much about BSD, but I'm guessing "cd cd" is wrong. πr2 (tc) 15:35, 4 December 2013 (UTC)

SPage (WMF) (talkcontribs)

Fixed. Feel free to make small fixes like that.

This post was posted by SPage (WMF), but signed as S Page (WMF).

Unable to connect to gerrit.wikimedia.org with ssh

2
Goldengide1 (talkcontribs)

I have been able to connect to gerrit.wikimedia.org in the last two week but early last week I had to reinstall my wampserver so I tried to connect again based on the instructions on Gerrit/Tutorial. This time it didnot connect it kept bringing up Permission denied (publickey). Please someone tell me what I am not doing right

OS: Windows 10

Goldengide1 (talkcontribs)

This is my debug message:

$ ssh -p 29418 myusername@gerrit.wikimedia.org -v

OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Connecting to gerrit.wikimedia.org [208.80.154.85] port 29418.

debug1: Connection established.

debug1: identity file /c/Users/Gideon/.ssh/id_rsa type 1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_rsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_dsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_dsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_ecdsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_ecdsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_ed25519 type -1

debug1: key_load_public: No such file or directory

debug1: identity file /c/Users/Gideon/.ssh/id_ed25519-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_7.3

debug1: Remote protocol version 2.0, remote software version GerritCodeReview_2.13.4-13-gc0c5cc4742 (SSHD-CORE-1.2.0)

debug1: no match: GerritCodeReview_2.13.4-13-gc0c5cc4742 (SSHD-CORE-1.2.0)

debug1: Authenticating to gerrit.wikimedia.org:29418 as 'Goldengide1'

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: algorithm: ecdh-sha2-nistp256

debug1: kex: host key algorithm: ssh-rsa

debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none

debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none

debug1: sending SSH2_MSG_KEX_ECDH_INIT

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

debug1: Server host key: ssh-rsa SHA256:j7HQoQ6fIuEgDHjONjI2CZ+2Iwxqgo2Ur5LbPqBgxOU

debug1: Host '[gerrit.wikimedia.org]:29418' is known and matches the RSA host key.

debug1: Found key in /c/Users/Gideon/.ssh/known_hosts:1

debug1: rekey after 4294967296 blocks

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: rekey after 4294967296 blocks

debug1: SSH2_MSG_NEWKEYS received

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey

debug1: Next authentication method: publickey

debug1: Offering RSA public key: c:/wamp/www/mediawiki/.ssh/id_rsa

debug1: Authentications that can continue: publickey

debug1: Offering RSA public key: /c/Users/Gideon/.ssh/id_rsa

debug1: Authentications that can continue: publickey

debug1: Trying private key: /c/Users/Gideon/.ssh/id_dsa

debug1: Trying private key: /c/Users/Gideon/.ssh/id_ecdsa

debug1: Trying private key: /c/Users/Gideon/.ssh/id_ed25519

debug1: No more authentication methods to try.

Permission denied (publickey).

Reply to "Unable to connect to gerrit.wikimedia.org with ssh"
Leszek Manicki (WMDE) (talkcontribs)

According to "Set your username and email" section user.name in get settings should be set to match the gerrit username, and not to user's "real name" or any other name she preferrs. Is this (still) the actual guideline we should be following? For instance, I have user.name set globally in git to my real name and wouldn't like to change for gerrit repos unless there is a reason to do so. Using a real name not a Gerrit username does not seem to affect Gerrit's web UI as far as I can tell: I can see my patchsets by clicking my name etc.

Leszek Manicki (WMDE) (talkcontribs)

BTW, I've just noticed that the name Gerrit uses when rebasing using the "Rebase" button or editting using Gerrit's UI is actually "Full Name" from the Setting, not the "Username". So that section is at least outdated in this regard. I'd edit it but would like to know for sure why using "real names" is wrong there.

EddieGP (talkcontribs)

I've removed this. Keeping this set to your real name definitely doesn't bother gerrit (I'm actually doing this all the time and I see other people at gerrit using it too). I guess someone messed this up with the gitreview-section where you need to set your username for gerrit to know who you are. But this doesn't apply to the general git setting.

Too complicated for minor fixes

3
Summary by EddieGP

One might use github as described or the gerrit patch uploader.

Rillke (talkcontribs)

If you are not interested in becoming a "MediaWiki hacker" but just in that some minor but annoying issues are fixed, gerrit/git is overly complicated; at least without a web-interface like github has. None of its so called "benefits" (like the local database) will help you; instead it adds unnecessary CPU load and consumes your power while resolving the edit-deltas. A waste of energy and resources.

SPage (WMF) (talkcontribs)

From the parent Gerrit page: "To simply browse & fork our code you can use the GitHub mirror." You can link to a github patch in a bug comment.

This post was posted by SPage (WMF), but signed as S Page (WMF).

Rillke (talkcontribs)

Thank you. Once G2G is fully functional, this won't be an issue anymore! And I hope it will be mentioned somewhere. Sometimes it's just a style bit to be fixed…

Until we're at this point, can you estimate (or did anyone analyze this) how much longer it takes when putting the patch in github compared to putting it directly into Gerrit?

"Network unreachable" message when making ssh connection to Gerrit

6
Asrajmane193 (talkcontribs)

Hello, I have started with the initial set up. I have everything upto adding ssh key to use with git.

I am running the command to make ssh connection to Gerrit: ssh asrajmane193@gerrit.wikimedia.org -p 29418

It gives me the message "ssh: connect to host gerrit.wikimedia.org port 29418: Network is unreachable". I tried changing the port to some random number, 29000. Still no luck.

I am fairly new here. Please help.

Florianschmidtwelzow (talkcontribs)

Can you try to ping gerrit.wikimedia.org? What is the result? (i assume you're using a linux distro?)

Xqt (talkcontribs)

29418 is the right port. Maybe it is blocked by a local router or firewall?

Shrutika719 (talkcontribs)

Is this problem resolved? Because I am still facing this problem, I tried switching the ports but all in vain

Darthbhyrava (talkcontribs)

I am facing a similar problem. I think it's the proxy. But even after I installed corkscrew, shifted the installed binary to /bin and made appropriate changes to .ssh/config, I get the same error.

The ping to gerrit is fine, btw.

Any leads?

Edit: Resolved.

There was an error in the path to my corkscrew binary in .ssh/config. I corrected it, added my public keys to gerrit, and it worked. :)

2A03:2880:1010:6FEE:FACE:B00C:0:8000 (talkcontribs)

isla bajo fue sé para chileno no

Reply to ""Network unreachable" message when making ssh connection to Gerrit"
Mylittlefrogs (talkcontribs)

My git-review installation did not complete successfully -- it exited halfway through. When I try to reinstall, I get the message: "Requirement already satisfied: (use --upgrade to upgrade)" in my command prompt. However, if I try to execute the command "git review -s", command prompt tells me: "git: 'review' is not a git command. See 'git --help'."

When I try to sudo rm git-review, it tells me that git-review does not exist. Does anyone have any tips for successfully installing git-review, in light of these roadblocks?

AKlapper (WMF) (talkcontribs)

Which operating system / distribution and distribution version is this about? How did you "install" exactly (which exact commands were executed)?

Mylittlefrogs (talkcontribs)

I am running OS X, El Capitan, Version 10.11.4. I ran "sudo pip install git-review", which did not successfully complete.

I'm stuck in a bind right now, though, because if I try to install git-review again, my computer thinks it already exists, and if I try to uninstall git-review, my computer does not think it exists. (Unless perhaps I am either incorrectly attempting to install or re-install git-review?).

Elvey (talkcontribs)

You mentioned trying to "sudo rm git-review". You might be in over your head. Using rm would probably mess up the configuration of any package manager. Maybe look at the manpages for rm and pip? Have you installed pip yet?

Nemo bis (talkcontribs)

I'm following the tutorial again for setup on another machine, and encountered the problem discussed in where Ori says "if you're a power user and know to configure ~/.config/git-review/git-review.conf to specify defaultremote=origin, then you just have to remember to clone Gerrit repositories using ssh://". If this tutorial suggests to do stuff appropriate only for power users, it shouldn't; or, if what above is correct, "git clone https://gerrit.wikimedia.org/r/p/test/mediawiki/extensions/examples.git" should be changed to ssh://.

SPage (WMF) (talkcontribs)

Yes, I think it should be ssh and you don't want two remotes.

Ori later made the killer suggestion to just tell ~/.gitconfig to rewrite the https URLs:

 [url "ssh://myUserName@gerrit.wikimedia.org:29418/"]
     insteadOf = "https://gerrit.wikimedia.org/r/mediawiki/core"

I don't know if this bit of fu made it into the docs.

This post was posted by SPage (WMF), but signed as S Page (WMF).

Dwlocks (talkcontribs)

Related to the topic, but not the first post:

After following the tutorial to use a system-wide default for git-review 1.25.0, I get the message:

19:36 $ git review -s
Using global/system git-review config files (/home/dlocks/.config/git-review/git-review.conf) is deprecated

The instructions still work, and git-review does in fact use origin as global default. However, there's also a deprecation warning after every git-review invocation. The docs indicate that

git config --global gitreview.remote origin

should be sufficient. I also added

git config --global gitreview.host my.gerrit.server

although it did not seem necessary, so I removed it.

SPage (WMF) (talkcontribs)

I don't see that deprecation warning in my git-review 1.24 package in Ubuntu 15.04, I guess it was added in 1.25. So it seems the docs should explain both approaches, unless there's a way to tell if git config --global gitreview.remote origin will have an effect. (Git will let you set any config variable, e.g. git config --global gitreview.foo bar.)

Reply to "defaultremote = origin"