The ONOS source code is stored at gerrit.onosproject.org. Setting up git
and Gerrit will allow you to easily fetch and test any version of ONOS, including releases, development versions, and patches that have been submitted for review. Setting up a Gerrit account and ssh
access will also enable you to submit your own patches to ONOS and also to participate in the ONOS code review process.
Read-only access to the ONOS source code via git
Make sure you've installed git
, and then create a local clone of the source repository:
...
However, if you want to contribute code to ONOS, you need to configure git and Gerrit for ssh
access, as described below.
Optional: Read-write access to the ONOS source code via Gerrit, ssh
and git-review
There are two ways to clone the code from Gerrit, https://
or ssh://
. Either way is fine for reading the code, but when it comes time to contribute your own patches the easiest and most secure way is to access Gerrit over SSH.
...
If you see ssh://
URLs, everything is fine and you can move on to the next step (Getting the source code using git and Configuring Gerrit). If you see https:// URLs, you should change them to ssh:// before continuing:
...
You can double-check the URL on Gerrit by logging in, going to Projects -> List, then clicking on 'onos', On the grey bar, click 'SSH', then just underneath the grey bar will appear 'git clone ssh://...'. This is the URL you should set your remote to in your local git repository.
Configuring Gerrit
Ensure <username>
is configured in Settings->Profile->Username; the Username is not populated for new accounts by default.
...
As shown above, email notifications are also configured from here by checking off the types of notifications to receive.
Uploading SSH Public Keys
An SSH key should also be uploaded to the ONOS Gerrit server.
...
Info |
---|
A key must be uploaded per host if checking code out to multiple hosts with git . |
Configuring git
Developers planning to contribute code should configure git with their username and email.
...