...
We recommend using SSH in which case you need to register your public key in your account settings in gerrit
If you choose to use HTTP/HTTPS, you'll need to generate an access password
In your gerrit account settings, select HTTP Password:
The icon at the right of the generated password allows you to copy the generated password to your clipboard, it will be needed when you interact with git/gerrit.
...
The code should now appear in the gerrit web interface, it needs a committer to approve it with a +2 and also move the verifed flag to +1, to do so, the committer can open the gerrit UI and click on the open review list
Then click on the Reply button, you can also add reviewers for their inputs, add a review comment, and move the flags to +2 and +1
Once a committer approves it, the code can be merged to the master branch
...
Linux Foundation uses Gerrit to download and upload code into repository. Gerrit plugin could be downloaded and installed in IntelliJ, in order to work with the LF code downloading/uploading procedure.
Using and IDE : Install Gerrit plugin in IntelliJ, cloning and pushing
Open File -> Settings -> Plugins of IntelliJ, and click on the Browse repositories... button.
In the new window, search for Gerrit, click Install to install the plugin, and finally restart IntelliJ.
To verify whether the Gerrit plugin is installed successfully, you can click File -> New -> Project from Version Control and verify whether Gerrit is present.
Working with a Proxy
For people working with a proxy, you might have proxy issues connecting to LF website. To avoid the connection issue, you shall define the proxy setting for both IntelliJ and Git.
To configure the proxy settings in IntelliJ, click File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy, enter the correct proxy settings and click Apply. In case of Manual proxy configuration, while entering the Host name, there is no need to write http:// in front of the URL. For example, if the proxy value is http://one.proxy.com, you shall put one.proxy.com as the Host name.
To configure the proxy settings for Git, play the following command:
...
Click http under the LF Project page, it will display the url to use to clone the project.
Then open your IntelliJ, click File -> Settings -> Version Control -> Gerrit, enter the URL for the LF Gerrit website, your LF username and password and click OK. To test whether the connection is good, you can also click the Test button before clicking OK.
Note: the URL is with https not with http.
Then open File -> New -> Project from Version Control -> Git to open Clone Repository window. Enter the http url you have found above, but with https not with http, chose your Parent Directory and Directory Name and click Clone to clone the project.
A window will pop up to input the user name and password. The user name shall be the username of your Linux Foundation account and the password is generated in the Linux Foundation website.
To generate the password, go to the Settings window, click on HTTP Password, input your username and click Generate Password.
Download with SSH URL
To download the project with ssh url, you need to add the ssh key into the LF Gerrit website.
Click your account name on the top right corner of the website and click on Settings.
In the Settings window, select SSH Public Keys. Put your public key of your machine into the window and click Add.
The steps to create the SSH Key could be found in the following page: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
Click ssh under the LF Project page, it will display the url to use to clone the project.
Then open your IntelliJ, click File -> Settings -> Version Control -> Gerrit, enter the URL for the LF Gerrit website, your LF username and password and click OK. To test whether the connection is good, you can also click the Test button before clicking OK.
Then open File -> New -> Project from Version Control -> Git to open Clone Repository window. Enter the ssh url you have found above, chose your Parent Directory and Directory Name and click Clone to clone the project.
For the first downloading, a OpenSSH window will appear to authenticate the host. Enter yes in the command location and click OK to progress.
Commit changes
Once you have made changed in the code, before push the changes, you should commit the code locally first.
To do that, go to the Version Control window, under Local Changes, right click the changed files and click Commit Changes....
In the Commit Changes window, enter the Commit Message, select Sign-off commit option and click Commit button.
Then go to the Terminal window, use command apt-get install git-review to install git-review plugin in the machine, if not already installed.
Once installed, under root location of the project enter command git config --list, make sure the email address listed is exactly the same as the one you used in your LF account.
If your address is not present or not the same as the one defined in LF account, enter command git config --global user.email "jondoe@intlsomewhere.att.com".
Then enter command git commit -as --amend to show the commit message and the sign off entry, as shown below. Make sure the email address is the exactly the same as the email you used in the LF account. If not, update the address.
Then enter command git review to upload the changed code into the LF for reviewing.
Go to Gerrit window and refresh, the committed changes will be shown in the window. Right click the commit, you can find the tab to Add Reviewers for reviewing or Abandon the changes if you don't want it any more.
If you have been selected as the reviewer of the changes. You can right click the corresponding commit and click Review, Code-Review to give your score and comments for the change.
— Should we put the above section in a sub section
Cloning and Pushing the repository using an IDE
Please follow the IDE plugin instructions to add a gerrit remote host, most of the command line instructions below will give you the answers that the IDE UI will ask for (URL, username, connection method etc..)