...
However, if you want to contribute code to ONOS, you need to configure git and Gerrit for ssh
access, as described below.
Warning | ||
---|---|---|
| ||
Generally, ssh is recommended if you want to contribute code. Anyway, you may be in some areas where access to ssh is restricted. If this is the case, please try to use https. The steps are similar, except that you'll need to enter your username and password each time you want to submit code. |
Optional: Read-write access to the ONOS source code via Gerrit, ssh
and git-review
...
As shown above, email notifications are also configured from here by checking off the types of notifications to receive.
Uploading SSH Public
...
Keys(only for ssh)
An SSH key should also be uploaded to the ONOS Gerrit server.
Generate a key. Keep the default file name and location. This will generate an id_rsa and id_rsa.pub file in ~/.ssh:
Code Block language text $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/onosuser/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/onosuser/.ssh/id_rsa. Your public key has been saved in /home/onosuser/.ssh/id_rsa.pub. ... $ ls ~/.ssh id_rsa id_rsa.pub known_hosts
- Upload the SSH public key. After logging into the Gerrit account, go to Settings > SSH Public Keys. Paste the contents of id_rsa.pub into the "Add SSH Public Key" box and hit Add:
...
Info |
---|
A key must be uploaded per host if checking code out to multiple hosts with git . |
Generate Password(only for https)
- After logging into the Gerrit account, go to Settings > HTTP Password, click Generate Password to generate the password which using when submitting code, if you forget the password just go to HTTP Password regenerate a new one.
Configuring git
Developers planning to contribute code should configure git with their username and email.
Code Block | ||
---|---|---|
| ||
git config --global user.name "firstname lastname" git config --global user.email "email@domain.com" |
Configuring git to remember password (only relevant for https, optional)
When using https and password to authenticate, you may want to use git credential helper to remember password for you.
See article provided by github for instruction setting up git credential helper: https://help.github.com/articles/caching-your-github-password-in-git/