Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-codereview: no support for ssh:// gerrit origin #9599

Closed
minux opened this issue Jan 15, 2015 · 6 comments
Closed

git-codereview: no support for ssh:// gerrit origin #9599

minux opened this issue Jan 15, 2015 · 6 comments

Comments

@minux
Copy link
Member

minux commented Jan 15, 2015

I think the basic functionality should work with ssh-based gerrit access.

It seems we only use gerrit api for submit, but not many people can use
git submit anyway.

PS: I think gerrit also support ssh based API too.

Background: I set up a Gerrit instance for some Go localization projects.
as I'm using the github plugin and use Github OAuth to authenticate
https, it's not possible to support https-based Gerrit API access with
password (it seems once the github plugin is enabled, all https login
requests will be forwarded to github.)
However, ssh should work fine, and Gerrit supports SSH public key.

OlingCat added a commit to Go-zh/review that referenced this issue Jan 15, 2015
workaround golang/go#9599, golang/go#9600
patched by @minux

Change-Id: Ib544b44436d454c59861a80cefeb94d0111ea0ec
Reviewed-on: https://go.minux.info/6
Reviewed-by: Minux <minux@golang.org>
@adg
Copy link
Contributor

adg commented Jan 16, 2015

I have no objections.

On 15 January 2015 at 20:35, Minux Ma notifications@github.com wrote:

I think the basic functionality should work with ssh-based gerrit access.

It seems we only use gerrit api for submit, but not many people can use
git submit anyway.

PS: I think gerrit also support ssh based API too.

Background: I set up a Gerrit instance for some Go localization projects.
as I'm using the github plugin and use Github OAuth to authenticate
https, it's not possible to support https-based Gerrit API access with
password (it seems once the github plugin is enabled, all https login
requests will be forwarded to github.)
However, ssh should work fine, and Gerrit supports SSH public key.


Reply to this email directly or view it on GitHub
#9599.

@minux
Copy link
Member Author

minux commented Jan 16, 2015

After consulting Gerrit documentation,
https://gerrit-review.googlesource.com/Documentation/cmd-query.html and
https://gerrit-review.googlesource.com/Documentation/cmd-review.html

It seems all the capabilities we need for git-codereview are available
through ssh:

$ ssh -p 29418 user@gerrithost gerrit query --format=JSON project:NAME owner:user I2975f7
{"project":"NAME","branch":"master","id":"I2975f7132d83793f66f6906de173e62e0b505322","number":"5","subject":"test CL","owner":{"name":"user","email":"user@example.com","username":"user"},"url":"https://gerrithost/5","commitMessage":"test CL\n\nChange-Id: I2975f7132d83793f66f6906de173e62e0b505322\n","createdOn":1421313296,"lastUpdated":1421382778,"sortKey":"00327f5000000005","open":true,"status":"NEW"}
{"type":"stats","rowCount":1,"runTimeMilliseconds":14}

Do you think this is enough? Do we need any other capabilities beyond finding which CLs are pending and submitting a CL?

@adg
Copy link
Contributor

adg commented Jan 19, 2015

I asked the Gerrit team and they say the SSH API is essentially deprecated and that the differences in output between the HTTP and SSH APIs may very quickly become a nightmare to manage. I'd prefer to not head down this road.

@minux
Copy link
Member Author

minux commented Jan 19, 2015

OK. I will need to find some way to expose the https endpoints in the
presence
of github OAuth plugin. Might be possible, but I'm not sure.

Google also deprecates OpenID v2, so how custom Gerrit instances suppose
to authenticate the users without implementing their own authentication
service
(e.g. LDAP)?

@adg
Copy link
Contributor

adg commented Jan 19, 2015

I can't speak to their plans. You'll need to ask the gerrit project
themselves.

On 19 January 2015 at 16:33, Minux Ma notifications@github.com wrote:

OK. I will need to find some way to expose the https endpoints in the
presence
of github OAuth plugin. Might be possible, but I'm not sure.

Google also deprecates OpenID v2, so how custom Gerrit instances suppose
to authenticate the users without implementing their own authentication
service
(e.g. LDAP)?


Reply to this email directly or view it on GitHub
#9599 (comment).

@mikioh mikioh changed the title review: no support for ssh:// gerrit origin git-codereview: no support for ssh:// gerrit origin Jan 19, 2015
@rsc
Copy link
Contributor

rsc commented Jan 19, 2015

Won't implement.

@rsc rsc closed this as completed Jan 19, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants