Versions Compared

Key

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

The ONOS source code is stored at gerrit.onosproject.org. Setting up git and gerrit 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 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

...

Make sure you've installed git, and then create a local clone of the source repository:

Code Block
$ git clone https://gerrit.onosproject.org/onos

...

If all you want to do is compile and run ONOS, you've got the code and are ready for the next step! However, if you want to contribute code to ONOS, you need to configure git and Gerrit for ssh access.

Configuring git and Gerrit for ssh access

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.

To make sure you're using the ssh:// remote, first check the URLs of the remotes in your ONOS repository:

Code Block
$ cd onos
$ git remote -v
origin  https://gerrit.onosproject.org/onos (fetch)
origin  https://gerrit.onosproject.org/onos (push)

If you see ssh:// URLs, everything is fine and you can move on to the next step (Source code access via git and gerrit). If you see https:// URLs, you should change them to ssh:// before continuing:

...

Substitute <username> with your Gerrit/Crowd username (the <username> must be specifically provisioned in Gerrit Profile for git)

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.

...

Tip
titlegit-review + Mac

If you're using a Mac, you may need to manually upgrade the git-review package dependency. (git-review bug#1337701)

$ sudo pip install --upgrade setuptools
$ sudo pip install --upgrade git-review