1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 Huawei Technologies Co., Ltd.
5 Configure git and gerrit
6 ========================
10 The recommended version of git is 2.7.4 or later. Check the installed version in the Ubuntu VM:
16 Create an SSH key to user with gerrit. Use no passphrase.
22 Enter your SSH public key (id_rsa) into gerrit:
24 - Browse to https://gerrit.onap.org
26 - Open the menu next to your name (under the green search button)
28 .. image:: images/Configure_git_1.png
31 - In the "Settings" sidebar, click "SSH Public Keys"`
33 - Paste the entire contents of $HOME/.ssh/id_rsa.pub into the text area and click "Add".
35 .. image:: images/Configure_git_2.png
37 Install the git-review package.
42 sudo apt install git-review
44 Create $HOME/.gitconfig (replace highlighted values with your own information):
47 name = FirstName LastName
49 email = you@yourcompany.com
61 username = YourLinuxFoundationId
63 **If you're behind a corporate firewall and your proxy server has SOCKS support...**
65 You may be able to use the SSH protocol with git, which is preferred versus HTTP. This method is known to work in the AT&T corporate network.
66 Install the socat package, which allows you to tunnel SSH connections through a proxy that supports SOCKS:
71 sudo apt install socat
73 Create (or append to) $HOME/.ssh/config (replace highlighted values with your information)
79 Hostname gerrit.onap.org
81 ProxyCommand socat - PROXY:host:%h:%p,proxyport=port
83 IdentityFile /home/userid/.ssh/id_rsa
85 ServerAliveInterval 10
87 Verify that you have connectivity to gerrit through the proxy. Answer "yes" to continue connecting, if prompted.
91 ssh -p 29418 gerrit.onap.org
93 .. image:: images/Configure_git_3.png