Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Move to the folder at the root of your development directory. For example:
    cd C:\Users\<user>\Documents\work
     
  2. Add a remote pointer to the Gerrit server that hosts your repository using either SSH or HTTPS. (Note: <REPONAME>s are given in various Development Guides.
    Using SSH:
    git remote add origin ssh://USERNAME@gerrit.openecomp.org:29418/<REPONAME>

    Using HTTPS:
    With HTTPS, first you will need the Gerrit HTTP-generated password for each HTTPS operation with Git/Gerrit.

    git remote add origin 
    https://USERNAME@gerrit.openecomp.org/r/a/<REPONAME>
     
  3. Now clone the remote repository. Since we clone in the current folder, it will create a subfolder with the remote copy.
    Using SSH:
    git clone ssh://USERNAME@gerrit.openecomp.org:29418/<REPONAME>

    Using HTTPS:
    With HTTPS, first you will need the Gerrit HTTP-generated password for each HTTPS operation with Git/Gerrit.

    git clone https://USERNAME@gerrit.openecomp.org/r/a/<REPONAME>

Setting up IntelliJ to Clone and Commit to Gerrit

Visit https://gerrit.openecomp.org and log in, using your Linux Foundation identity. Here, you will be able to view the names of Projects to which you have access.

On top of the project listing, the web site provides you the command to clone the whole project, such as:

Image Added

The project can be downloaded in either of two ways, via HTTP url or SSH url.

IntelliJ and HTTP URL

Open IntelliJ and click File -> Settings -> Version Control -> Gerrit. In the resulting dialog box, enter the Gerrit URL as shown above, along with your Linux Foundation username and password. To test whether the connection is good, you can click the Test button:

Info
titlehttps: Required

The URL must use https:, not http:.

Once you have entered this information, click OK:

Image Added

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 local Parent Directory and Directory Name and click Clone to clone the project.

Image Added

A window will pop up to input the user name and password. The user name is the username of your Linux Foundation account, and the password is the Gerrit HTTPS password generated during setup.

To generate the password, go to the Settings window, click on HTTP Password, input your username and click Generate Password.

Image Added

Image Added


Download with SSH URL

To download the project with ssh url, you need to add the ssh key into the Linux Foundation Gerrit website.

Click your account name on the top right corner of the website and click on Settings.

Image Added

In the Settings window, select SSH Public Keys. Put your public key of your machine into the window and click Add.

Image Added

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 Linux Foundation Project page, it will display the url to use to clone the project.

Image Added

Then open your IntelliJ, click File -> Settings -> Version Control -> Gerrit, enter the URL for the Linux Foundation Gerrit website, your Linux Foundation username and password and click OK. To test whether the connection is good, you can also click the Test button before clicking OK.

Image Added

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.

Image Added

For the first downloading, a OpenSSH window will appear to authenticate the host. Enter yes in the command location and click OK to progress.

Image Added

Pushing changes for review using a command line

...