.rst file for configuring git and gerrit 45/22245/1
authorseshukm <seshu.kumar.m@huawei.com>
Mon, 6 Nov 2017 06:18:22 +0000 (11:48 +0530)
committerseshukm <seshu.kumar.m@huawei.com>
Mon, 6 Nov 2017 06:18:22 +0000 (11:48 +0530)
IssueId: SO-300

Change-Id: I8d78638353f6280435afb7178d4f91bcee253b97
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
docs/Configure_git_and_gerrit.rst [new file with mode: 0644]

diff --git a/docs/Configure_git_and_gerrit.rst b/docs/Configure_git_and_gerrit.rst
new file mode 100644 (file)
index 0000000..ccd0785
--- /dev/null
@@ -0,0 +1,92 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright 2017 Huawei Technologies Co., Ltd.\r
+\r
+Configure git and gerrit\r
+========================\r
+\r
+Basics\r
+------\r
+The recommended version of git is 2.7.4 or later.  Check the installed version in the Ubuntu VM:\r
+\r
+.. code-block:: bash\r
+\r
+       git --version\r
+\r
+Create an SSH key to user with gerrit.  Use no passphrase.\r
+\r
+.. code-block:: bash\r
+\r
+       ssh-keygen -t rsa\r
+       \r
+Enter your SSH public key (id_rsa) into gerrit:\r
+       Browse to https://gerrit.onap.org\r
+       Log in\r
+       Open the menu next to your name (under the green search button)\r
+       \r
+.. image:: images/Configure_git_1.png\r
+\r
+       Select "Settings"\r
+       In the "Settings" sidebar, click "SSH Public Keys"`\r
+       Click "Add Key..."\r
+       Paste the entire contents of $HOME/.ssh/id_rsa.pub into the text area and click "Add".\r
+       \r
+.. image:: images/Configure_git_2.png\r
+\r
+Install the git-review package.\r
+\r
+.. code-block:: bash\r
+\r
+       sudo apt update\r
+       sudo apt install git-review\r
+       \r
+Create $HOME/.gitconfig (replace highlighted values with your own information):\r
+       [user]\r
+       \r
+        name = FirstName LastName\r
+               \r
+        email = you@yourcompany.com\r
+               \r
+       [core]\r
+       \r
+        autocrlf = false\r
+               \r
+       [merge]\r
+       \r
+        tool = vimdiff\r
+               \r
+       [gitreview]\r
+       \r
+        username = YourLinuxFoundationId\r
+               \r
+**If you're behind a corporate firewall and your proxy server has SOCKS support...**\r
+\r
+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.\r
+Install the socat package, which allows you to tunnel SSH connections through a proxy that supports SOCKS:\r
+\r
+.. code-block:: bash\r
+\r
+       sudo apt update\r
+       sudo apt install socat\r
+       \r
+Create (or append to) $HOME/.ssh/config (replace highlighted values with your information)\r
+\r
+       Host gerrit.onap.org\r
+       \r
+       User userid\r
+       \r
+       Hostname gerrit.onap.org\r
+       \r
+       ProxyCommand socat - PROXY:host:%h:%p,proxyport=port\r
+       \r
+       IdentityFile /home/userid/.ssh/id_rsa\r
+       \r
+       ServerAliveInterval 10\r
+\r
+Verify that you have connectivity to gerrit through the proxy.  Answer "yes" to continue connecting, if prompted.\r
+\r
+.. code-block:: bash\r
+\r
+       ssh -p 29418 gerrit.onap.org\r
+       \r
+.. image:: images/Configure_git_3.png
\ No newline at end of file