1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2020 Nokia.
8 This chapter is based on the `Git Guide <https://docs.releng.linuxfoundation.org/en/latest/git.html>`_
9 and the `Gerrit Guide <https://docs.releng.linuxfoundation.org/en/latest/gerrit.html>`_
10 in the Linux Foundation Releng Documentation.
15 Before you start, you should have an LFID account (sign up
16 `here <https://identity.linuxfoundation.org/>`_).
23 For Debian based systems:
27 sudo apt-get install git -y
30 For rpm based systems:
34 sudo dnf install git -y
37 For MacOS systems, install `homebrew <http://brew.sh>`_ and install Git
43 .. note:: For more information on git, see the `Git Guide <https://docs.releng.linuxfoundation.org/en/latest/git.html>`_ in the Linux Foundation Releng Documentation.
48 1. Set the author name or email used to sign off a commit with the following commands.
52 git config --local user.name "Your Name"
53 git config --local user.email yourname@example.com
55 .. note:: Your name and e-mail address (including capitalization) must match the one you entered when creating your LFID account.
57 2. Optionally, change the Git commit editor to your preferred editor, for example, vim.
61 git config --global core.editor "vim"
66 1. Install git-review.
70 pip install git-review
72 .. note:: If you don’t have pip installed already, follow the `installation documentation <https://pip.pypa.io/en/stable/installation/>`_ for pip.
82 For OpenSSH 8.7 or older versions:
88 For OpenSSH 8.8 or later versions, either use ed25519 or ECDSA algorithm to generate ssh keys:
100 .. note:: OpenSSH 8.8+ disables RSA signatures using the SHA-1 hash algorithm by default, which may cause authentication problem when pull/push code. You can either specify the encrypt algorithm or re-enable the RSA/SHA1 in ~/.ssh/config file to solve the issue. For more information, please refer to `OpenSSH Release Notes <https://www.openssh.com/releasenotes.html>`_.
102 Your public key is now available as .ssh/id_rsa.pub or .ssh/id_ed25519.pub or .ssh/id_ecdsa.pub under .ssh folder.
104 2. Print the generated key to the terminal and copy it.
110 3. On the project gerrit page, go to Settings.
112 .. figure:: https://docs.releng.linuxfoundation.org/en/latest/_images/gerrit-settings.png
113 :alt: Settings page for your Gerrit account
116 4. Click **SSH Public Keys** under **Settings**.
118 5. Click **Add Key**.
120 6. In the **Add SSH Public Key** text box, paste the contents of your **id\_rsa.pub** file and then click **Add**.
122 .. figure:: https://docs.releng.linuxfoundation.org/en/latest/_images/gerrit-ssh-keys.png
123 :alt: Adding your SSH key
126 Setting up CLA as an individual contributor
127 -------------------------------------------
129 1. Navigate to **Settings** — the gear icon on the upper right corner, and click **Agreements** from the menu on the left:
131 .. figure:: https://raw.githubusercontent.com/communitybridge/docs/master/.gitbook/assets/settings-icon.png
133 .. figure:: https://raw.githubusercontent.com/communitybridge/docs/master/.gitbook/assets/agreements.png
135 2. Click **New Contributor Agreement**.
137 .. figure:: https://raw.githubusercontent.com/communitybridge/docs/master/.gitbook/assets/agreement-link.png
139 3. New Contributor Agreement types appear:
141 .. figure:: https://raw.githubusercontent.com/communitybridge/docs/master/.gitbook/assets/new-contributor-agreement.png
143 4. Choose the Individual CLA option.
145 .. figure:: CLA_types.png
147 5. Click the **Please review the agreement link** and then click the message link that appears:
149 .. figure:: https://raw.githubusercontent.com/communitybridge/docs/master/.gitbook/assets/cla-gerrit-icla-proceed-to-sign-cla.png
151 6. Sign in to EasyCLA if you are prompted.
153 7. Select **Company**.
155 .. note:: To contribute to this project, you must be authorized under a signed Contributor License Agreement. You are contributing on behalf of your work for a company.
157 If any further prompts appear, follow the steps described at the below links:
159 - `Individual Contributor <https://docs.linuxfoundation.org/v2/easycla/contributors/individual-contributor#gerrit>`_
160 - `Corporate Contributor <https://docs.linuxfoundation.org/v2/easycla/contributors/corporate-contributor#gerrit>`_
162 8. Complete the form and click **SEND**.
164 The CCLA manager signs a Corporate CLA and adds you to the approved list.