Last modified: 2013-01-28 00:40:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46398, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44398 - Cannot use git review on my instance. git review has been setup, but cannot connect to gerrit (see traceback inside)
Cannot use git review on my instance. git review has been setup, but cannot c...
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-27 06:17 UTC by T. Gries
Modified: 2013-01-28 00:40 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2013-01-27 06:17:58 UTC
This issue has been shortly discussed with Ryan some days ago, but we could not fix it. The consequence is, that I cannot make use of the instance "openid-wiki" for testing _and_ submission to gerrit.

Please assist.


git review -s
=============

Could not connect to gerrit.
Enter your gerrit username: wikinaut

Trying again with ssh://wikinaut@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples.git

<traceback object at 0x200d5f0>
We don't know where your gerrit is. Please manually create
a remote named "gerrit" and try again.
Traceback (most recent call last):
  File "/usr/local/bin/git-review", line 863, in <module>
    main()
  File "/usr/local/bin/git-review", line 798, in main
    config['hostname'], config['port'], config['project'])
  File "/usr/local/bin/git-review", line 389, in check_remote
    add_remote(hostname, port, project, remote)
  File "/usr/local/bin/git-review", line 250, in add_remote
    raise Exception("Could not connect to gerrit at %s" % remote_url)
Exception: Could not connect to gerrit at ssh://wikinaut@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples.git

git config -l
=============

user.name=Wikinaut
user.email=mail@tgries.de
alias.add=add -v
alias.amend=commit --amend -a
alias.br=branch
alias.co=checkout
alias.dc=diff --cached
alias.di=diff
alias.fetchall=fetch -v --all
alias.l=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %C(cyan)%s %Cgreen %ai %an%Creset' --abbrev-commit
alias.log-me=log --author=Wikinaut --pretty=format:'%h %cd %s' --date=short
alias.log-nice=log --graph --decorate --pretty=oneline --abbrev-commit
alias.panic=!tar cvf ../git_panic.tar *
alias.st=status
alias.wdiff=diff --word-diff=plain
gitreview.username=Wikinaut
user.email=mail@tgries.de
user.name=Wikinaut
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://gerrit.wikimedia.org/r/p/test/mediawiki/extensions/examples.git
branch.master.remote=origin
branch.master.merge=refs/heads/master


This issue has been shortly discussed with Ryan some days ago, but we could not fix it. The consequence is, that I cannot make use of the instance "openid-wiki" for testing _and_ submission to gerrit.

Please assist.
Comment 1 Alex Monk 2013-01-27 13:29:58 UTC
You've got your own Gerrit setup and running, but you're still connecting to gerrit.wikimedia.org...?
Comment 2 T. Gries 2013-01-27 16:41:42 UTC
(In reply to comment #1)
> You've got your own Gerrit setup and running, but you're still connecting to
> gerrit.wikimedia.org...?

Krenair, I was wrong.

I setup (on the instance) git review (not: gerrit)
https://www.mediawiki.org/wiki/Git/Tutorial#Setting_up_git-review

and this does not work.

- git review -s
-> Could not connect to gerrit.
Comment 3 T. Gries 2013-01-27 16:42:45 UTC
pls. can someone assist, I am now on irc://irc.freenode.net/#wikimedia-labs
Comment 4 Andre Klapper 2013-01-27 17:08:39 UTC
IIRC git-review checks .gitreview for how to access Gerrit. 
Does a .gitreview file exist in your checkout, and if so what's its content?
Comment 5 Chad H. 2013-01-27 19:51:43 UTC
This is not an issue with Git or Gerrit really, but rather Labs. Due to the way labs is setup, you are unable to SSH from Labs to the production cluster (this includes Gerrit).

Simply put: you cannot use Gerrit over SSH from Labs. As a result, git-review isn't going to be very useful at all.

However, if you want to still do operations with Gerrit over HTTPS, you can do that. If you visit your HTTP Password panel in your preferences[0], you can generate a randomized password (and clear it/regenerate a fresh one). With this password, you can perform all of the write operations over https://.

For example: `git push https://gerrit.wikimedia.org/r/p/mediawiki/core HEAD:refs/for/master`, which would prompt you for your username/password.

So yeah, I'm marking this WONTFIX, since we're not going to open up SSH from labs to gerrit. However, I believe a viable workaround exists with HTTPS (and really, this is the default behavior for most sites that don't even enable SSH to Gerrit or use git-review).

[0] https://gerrit.wikimedia.org/r/#/settings/http-password
Comment 6 Alex Monk 2013-01-27 20:03:09 UTC
(In reply to comment #5)
> Simply put: you cannot use Gerrit over SSH from Labs. As a result, git-review
> isn't going to be very useful at all.

alex@alex:~$ ssh -A bastion.wmflabs.org

If you are having access problems, please see: https://labsconsole.wikimedia.org/wiki/Access#Accessing_public_and_private_instances
Last login: Sun Jan 27 20:00:50 2013 from 95.147.73.90
krenair@bastion1:~$ ssh -p 29418 gerrit.wikimedia.org

  ****    Welcome to Gerrit Code Review    ****

  Hi Alex Monk, you have successfully connected over SSH.

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://krenair@gerrit.wikimedia.org:29418/REPOSITORY_NAME.git

Connection to gerrit.wikimedia.org closed.
Comment 7 T. Gries 2013-01-27 21:32:48 UTC
Chad, Krenair: thank you danke merci bedankt.

Your explanations are convincing, and the essentials of your replies should be documented on the labsconsole info page.

If I have time, I will do that, (or perhaps you experts find the time).
Comment 8 Chad H. 2013-01-28 00:40:34 UTC
(In reply to comment #6)

I stand corrected.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links