Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Stardust/Contributing via Gerrit"

m (Configuring the Cloned Target Repository)
(Prerequisites)
Line 4: Line 4:
  
 
* an eclipse.org [https://dev.eclipse.org/site_login/ account]
 
* an eclipse.org [https://dev.eclipse.org/site_login/ account]
* a Git client, preferably [http://www.eclipse.org/egit/ EGit]
+
* a Git client, preferably [http://www.eclipse.org/egit/ EGit] (this article was created using EGit 1.3.0)
  
 
== Obtaining/Reviewing Git credentials in Gerrit ==
 
== Obtaining/Reviewing Git credentials in Gerrit ==

Revision as of 05:24, 27 July 2012

Stardust uses Gerrit Code Review for its Git repositories. Please refer to Handling Git Contributions via Gerrit for a general overview.

Prerequisites

  • an eclipse.org account
  • a Git client, preferably EGit (this article was created using EGit 1.3.0)

Obtaining/Reviewing Git credentials in Gerrit

Gerrit handles all PUSHes into Stardust repositories. In consequence the credentials used for PUSHing are to be maintained within Gerrit as well.

  • Use your eclipse.org account to log into Gerrit.
    • Logging in for the first time might require some extra confirmation. For this, please review the on screen instructions.
  • Using HTTPS URLs is probably the easiest way of setting up your contributor workspace. This will require a combination of username/password, which can be generated/obtained at Settings/HTTP Password.
Important.png
HTTP sends passwords in plain text. To ensure your password remains a secret only HTTPS should be used.
  • Alterntively SSH keys can be used. This will require to provide one or several public keys at Settings/SSH Public Keys. However, use of SSH is not further explained in this article.

Cloning a Target Repository

  • Use File / Import... / Projects from Git to open the Clone wizard, choose URI for Repository Source.
  • In the following page (Source Git Repository), enter the repository URI (e.g. https://git.eclipse.org/r/p/stardust/org.eclipse.stardust.ide.git). Feel free to fill in Authentication details. However, just for Cloning a repository no credentials are required yet.
Contrib-gerrit-clone01.png
Note.png
Enabling Gerrit has required a new set of repository URIs. For HTTPS as access method, the new URIs are following the schema https://git.eclipse.org/r/p/stardust/repository.name.git, where repository.name has to be replaced with the actual name (org.eclipse.stardust.ide in the example).
  • On the next page (Branch Selection), confirm to clone the master branch.
  • On the next page (Local Destination), choose a proper Destination Directory. For clarity, adjust the Remote name to stardust (although the original origin will work as well).
Contrib-gerrit-clone02.png
  • After pressing Next, EGit will clone the repository into the given destination directory. Upon success it will also suggest ti import any existing Eclipse projects into your workspace. Feel free to skip that step for now by pressing Cancel.

Configuring the Cloned Target Repository

Gerrit acts as a front end to Git. While most Git/EGit operations will work as is against Gerrit, some operations require special preparation. The following steps will help to prepare the previously created repository clone for seamless operation against Gerrit.

  • Use Window / Show View / Other... to open the Git Repositories view. This view should list the previously cloned repository.
  • In this view, from the context menu of the repository select Properties. This will open the repository's Configuration dialog.
Contrib-gerrit-conf01.png
  • Select Add Entry.... In the resulting dialog enter gerrit.createchangeid as Key and true as Value, press OK.
Contrib-gerrit-conf02.png
  • Review the new entry, close the dialog by selecting OK.
Contrib-gerrit-conf03.png
  • In the Git Repositories view, from the context menu of the repository select Fetch.... In the resulting dialog, ensure 'stardust' is selected as Configured Remote Repository and select Next.
Contrib-gerrit-conf04.png
  • On the next page (Fetch Ref Specifications), enter refs/notes/* into both the Source ref and Destination ref fields, select Add spec. This will add a new row to the Specifications for fetch table.
Contrib-gerrit-conf05.png
  • In this added row, select the Force Update checkbox. As well, ensure the Save specifications in 'stardust' configuration checkbox is enabled, select Finish to close the dialog.
Contrib-gerrit-conf06.png
  • Upon close a follow up dialog reporting the result of a Fetch operation will be displayed. Assuming no error gets reported this dialog can just be dismissed. Otherwise revisit the Fetch Ref Specifications dialog for potential misconfigurations.
  • In the Git Repositories view, from the context menu of the repository select Push.... In the resulting dialog, ensure 'stardust' is selected as Configured Remote Repository and select Next.
Contrib-gerrit-conf07.png
  • On the next page (Push Ref Specifications), enter HEAD into the Source ref field and refs/for/master into the Destination ref field, select Add spec. This will add a new row to the Specifications for push table.
Contrib-gerrit-conf08.png
  • In this added row, select the Force Update checkbox. As well, ensure the Save specifications in 'stardust' configuration checkbox is enabled, select Finish to close the dialog.
Contrib-gerrit-conf09.png
  • Upon close a follow up dialog reporting the result of a Push operation will be displayed. Assuming no error gets reported this dialog can just be dismissed. Otherwise revisit the Push Ref Specifications dialog for potential misconfigurations.
Note.png
If you did not enter them before you will be asked now for your Git credentials. Just enter the HTTP username/password from Gerrit as configured/reviewed before.


Preparing and Submitting a Contribution

TODO

Back to the top