...
- Move to the folder at the root of your development directory. For example:
cd C:\Users\<user>\Documents\work
- 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 originhttps://USERNAME@gerrit.openecomp.org/r/a/<REPONAME>
- 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:
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 | ||
---|---|---|
| ||
The URL must use https:, not http:. |
Once you have entered this information, click OK:
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.
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.
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.
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 Linux Foundation 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 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.
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.
Pushing changes for review using a command line
...