Page MenuHomePhabricator

make git-review support pushing via https
Closed, DeclinedPublic

Description

Currently, its not possible to push to gerrit using https method.
Since people with internet on which port 29418 is blocked can't access it through ssh, it makes a hard time to contribute, so it would better to have an alternative.
Also git review doesn't work with https.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz59865

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:32 AM
bzimport added projects: Gerrit, Upstream.
bzimport set Reference to bz59865.
bzimport added a subscriber: Unknown Object (MLST).

But still it would be easier to push through git-review, and https is not possible with it.

I'd like to reopen it because i suggested to create it. reasoning: there are probably quite a few users who are behind firewalls that don't allow them to connect to the high gerrit port. And there seem to be at least some theoretical solutions, like:

login gerrit-server-host -> settings -> http password -> generate password.

https://groups.google.com/forum/#!topic/repo-discuss/7BXB_t7cHs8

just curious if that has ever been considered before, pls CC: demon

(In reply to comment #0)

Currently, its not possible to push to gerrit using https method.

Yes it is.

Since people with internet on which port 29418 is blocked can't access it
through ssh, it makes a hard time to contribute, so it would better to have
an
alternative.

That's bug 35611.

Also git review doesn't work with https.

git-review is awful :(

apsdehal,

to summarize, because i also wanted to know this and asked around:

you can push via https using the gerrit feature to set a "http pass", gerrit would let you do this, git let's you do it, the only problem is that the "git review" tool does not support this. So your workaround is one of:

  • don't use git review and use the longer manual git commands instead,
  • fix the git review tool itself, which is not part of git core,

or

  • find or write another tool that makes it comfortable to do but does not have this limitation

so this is not a bug against gerrit, but just against the git review tool that we recommend to use, but you don't have to use it.

hope that helped

Daniel,

Thanks for your concern, I would look upon and check the http push you said and would look into git review to see if I can fix it.

git-review currently relies heavily on gerrit SSH commands to query some information. We sill have some issues to resolve with it. Adding HTTP support would mean a major rewrite.

See also https://bugs.launchpad.net/git-review/+bug/1194718/comments/6 for some background.

I am pretty sure there was an upstream bug somewhere about it but I can't find it now (daydreaming?)

I was able to push my change to existing gerrit repo using the command
git push https://username@gerrit.wikimedia.org/r/mediawiki/extensions/ExtensionName HEAD:refs/changes/[last two digits of gerrit repo no]/repono.

For example:-
If username:- is foo and extension is UploadWizard and repo no. is 123456 do the following

git push https://foo@gerrit.wikimedia.org/r/mediawiki/extensions/UploadWizard HEAD:refs/changes/56/123456

hashar claimed this task.
hashar subscribed.

Per:

git-review currently relies heavily on gerrit SSH commands to query some information. We sill have some issues to resolve with it. Adding HTTP support would mean a major rewrite.

See also https://bugs.launchpad.net/git-review/+bug/1194718/comments/6 for some background.

I am declining this task. The workaround is to not use git-review but instead the git push to refs/heads/for/ as mentioned by @Apsdehal.

If one really want to have git-review to support https, a better place would be in upstream bug tracker.