FAQ for Gerrit Access
For a tutorial of using Gerrit, this external wiki page is very helpful: https://www.mediawiki.org/wiki/Gerrit/Tutorial.
Here we try to gather frequently asked questions about Gerrit access and provide information on how to debug and resolve. If your question is not listed, please add to the end of this page.
Cannot Clone
This is usually a network access issue. Make sure the local network admin has opened access:
- the hostname gerrit.o-ran-sc.org is resolvable;
- gerrit.o-ran-sc.org is ping-able;
- ports needed by git clone are open.
- Git clone can be done in three different ways: http, https, or ssh. Their ports are 80, 443, and 29418 respectively.
Cannot Push to Master Branch
With Gerrit review workflow, master branch is not directly accessible. Code change is pushed onto a temp reference branch, and merged onto master branch by Gerrit server when a repo committer accepts the change.
Cannot Create/Push My Own Branch
Everybody can clone then create local branch on his/her dev machine. But not all can push new branch to gerrit. Only committers of a repo can create branches.
Thus the Pull Request workflow of git is not used here. See the external wiki page referenced above for a tutorial on how to submit code changes.
Cannot "git review -s"
This problem may occur due to a number of reasons. Because this step involves ssh connection to gerrit.o-ran-sc.org on a specific port for verifying ssh-key handshake, the following steps can help narrow down the issue.
- Local firewall may block such outgoing traffic.
- Run : nc gerrit.o-ran-sc.org 29418
- We should see something similar to: “SSH-2.0-GerritCodeReview_2.16.8 (SSHD-CORE-2.0.0)”. If not, most likely your local firewall is blocking outgoing traffic on port 29418. This can either be resolved by working with local IT networking staff, or switch to a different access.
- If step 1 test passes, the next is to verify that ssh is working:
- ssh -p 29418 {{ your Linux Foundation ID }}@gerrit.o-ran-sc.org gerrit version
- This command basically ssh into the gerrit server and run a simple version check command. We should see something like: gerrit version 2.16.8. If not, our ssh client is not configured correctly. Most likely the ssh key is not configured properly. We can now follow ssh debug process to figure what the problem is. Fir example, running option "-vvv" with the ssh command.
- Because the O-RAN SC project requires all contributors to sign contribution agreement, "git review -s" will not work if the contributor has not done so. This can be verified by running: git push --dry-run ssh://{{ your Linux Foundation ID }}@gerrit.o-ran-sc.org:29418/it/dep --all. . If the CLAs have been signed, the expected response is: "Everything up-to-date". Otherwise, please proceed to sign the CLAs by following this tutorial: Signing Contributor License Agreement.
- If all previous steps work, the next suspect is local Gerrit/git configuration.