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 "Gerrit"

(New page: == Using Gerrit hosted at https://git.eclipse.org/r == === User Account === *In order to contribute you need an [https://dev.eclipse.org/site_login/createaccount.php Eclipse user account]...)
 
(Using Gerrit with EGit:)
Line 49: Line 49:
 
** From the appropriate Remotes node, create a New Remote and choose to Configure for Push.  A unique name should be chosen, ''review'' is suggested.
 
** From the appropriate Remotes node, create a New Remote and choose to Configure for Push.  A unique name should be chosen, ''review'' is suggested.
 
** Change the main URI or Add a Push URI (your Gerrit user name must be used here)  
 
** Change the main URI or Add a Push URI (your Gerrit user name must be used here)  
*** JGit: <code>ssh://username@git.eclipse.org:29418/jgit.git</code>
+
*** <code>ssh://username@git.eclipse.org:29418/(project).git</code>   
*** EGit: <code>ssh://username@git.eclipse.org:29418/egit.git</code>   
+
 
** In the Ref Mapping section, Add a RefSpec Specification of <code>HEAD:refs/for/master</code>
 
** In the Ref Mapping section, Add a RefSpec Specification of <code>HEAD:refs/for/master</code>
 
** Changes Committed to your local clone will now be able to be Pushed to Gerrit using the ''review'' Remote.  You will be prompted for your private key's passphrase if Eclipse is looking for it in the right place.
 
** Changes Committed to your local clone will now be able to be Pushed to Gerrit using the ''review'' Remote.  You will be prompted for your private key's passphrase if Eclipse is looking for it in the right place.
  
 
*Visit our [https://git.eclipse.org/r/ Gerrit Code Review instance] to start reviewing
 
*Visit our [https://git.eclipse.org/r/ Gerrit Code Review instance] to start reviewing

Revision as of 12:17, 31 January 2012

Using Gerrit hosted at https://git.eclipse.org/r

User Account

  • In order to contribute you need an Eclipse user account . If you are an Eclipse committer you already have one.
  • Confirm you agree to the Eclipse.org Terms of Service by completing the Individual Contributor agreement.

Logon

Gerrit Web UI
Logon to the Gerrit Web UI using the email address you registered with your Eclipse (and Bugzilla) account and your Eclipse password.
Git over SSH
When accessing Gerrit over SSH from git or EGit use the username displayed here and upload your public SSH key to Gerrit here
Git over HTTPS
When accessing Gerrit over HTTPS from git or EGit use username and HTTP password displayed here

SSH Key Pair

  • Add one or more public SSH keys to Gerrit here.
  • If you are absolutely certain you do not have keys already, you must create a public and private pair of SSH keys. It is strongly recommended that you use a passphrase.
  • Generating SSH key pair on command line
ssh-keygen -t rsa -C "your_email@youremail.com"
  • Execute SSH once to accept the host key (or copy it from the registration web page)
ssh -p 29418 username@git.eclipse.org

Using Gerrit with the git command line:

  • Upload your patch from Git to the target project:
git push ssh://username@git.eclipse.org:29418/(project).git HEAD:refs/for/master

Or, create a new bug and attach a Git formatted patch file, as produced by the `git format-patch` tool.

Adding a dedicated remote

Since git can have multiple remotes, you can define one to be used to refer to Gerrit to save typing. Inside a previously checked-out repository you can run:

cd path/to/project
git config remote.review.url ssh://username@git.eclipse.org:29418/(project).git
git config remote.review.push HEAD:refs/for/master

You can now submit review requests from either repository using:

git push review

Using Gerrit with EGit:

Eclipse will look for your private key in the SSH2 Home location specified in the General>Network Connections>SSH2 Preference Page. If your id_rsa private key makes use of the AES-128-CBC algorithm (view the file as text to confirm), Eclipse will need at least com.jcraft.jsch 0.1.44 to make use of it.

  • Clone the JGit and EGit repositories and use the last page of the Clone Wizard to configure pushing to the code review queue.
  • Alternative approach adding a review remote in the Git Repositories view:
    • From the appropriate Remotes node, create a New Remote and choose to Configure for Push. A unique name should be chosen, review is suggested.
    • Change the main URI or Add a Push URI (your Gerrit user name must be used here)
    • In the Ref Mapping section, Add a RefSpec Specification of HEAD:refs/for/master
    • Changes Committed to your local clone will now be able to be Pushed to Gerrit using the review Remote. You will be prompted for your private key's passphrase if Eclipse is looking for it in the right place.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.