Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Automatic Gerrit setup for Eclipse.org repos ?

On Fri, Feb 20, 2015 at 12:36 PM, Oberhuber, Martin <Martin.Oberhuber@xxxxxxxxxxxxx> wrote:

So… if each and every Eclipse committer needs to setup Gerrit manually for each repo they work on, what is the simplest way doing this ?

 

In the past I have used the command-line (git config remote.review.url / git config remote.review.push) as per

https://wiki.eclipse.org/Gerrit#Adding_a_dedicated_remote

But this is awkward since I always need to find out the proper remote URL when I cloned from git:// or http:// initially.

 

I recently found that using https:// from the beginning, I can use the method from

https://wiki.eclipse.org/EGit/User_Guide#Enabling_Gerrit_for_a_repository

and I only need to enter my Gerrit username, and later the password obtained from

https://git.eclipse.org/r/#/settings/http-password

See also attached screenshot, which I was kinda missing in the EGit Docs (it was not clear for me where exactly to find the “Gerrit Configuration…”).

 

Is that the best / simplest procedure ?

Could it perhaps be simplified with a well-known file located in the repository that would identify it as Gerrit-enabled ?

Or could the workflow in EGit be simplified?


if the url of a remote is using http or https protocol we can send a GET request on the path
/config/server/version
if it returns a Gerrit version e.g.
)]}' "2.9.4"
we know it's a Gerrit server and could automatically configure EGit for Gerrit.

For the ssh protocol there is a similar command
but this requires that the user has uploaded his public key to the Gerrit server

-Matthias


Back to the top