CINXE.COM

Setting Up Your Gerrit Account — contributor-guide documentation

<!DOCTYPE html> <html lang="en" data-content_root="../"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Setting Up Your Gerrit Account &#8212; contributor-guide documentation</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=639405c8" /> <link rel="stylesheet" type="text/css" href="../_static/basic.css?v=fb9458d3" /> <script src="../_static/documentation_options.js?v=5929fcd5"></script> <script src="../_static/doctools.js?v=9a2dae69"></script> <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="How to Become a Patch Guru?" href="../code-and-documentation/patch-best-practices.html" /> <link rel="prev" title="Setup and Learn GIT" href="git.html" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="../_static/css/bootstrap.min.css" rel="stylesheet"> <!-- Fonts --> <link href="../_static/css/font-awesome.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="../_static/css/combined.css" rel="stylesheet"> <!-- Search CSS --> <link href="../_static/css/search.css" rel="stylesheet"> <!-- Pygments CSS --> <link href="../_static/pygments.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-17511903-1', 'auto'); ga('send', 'pageview'); </script> <!-- End Google Analytics --> </head><body> <!-- SOURCE_FILE: https://opendev.org/openstack/contributor-guide/src/doc/source/common/setup-gerrit.rst --> <script> (function (window, document) { var loader = function () { var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; script.src = "https://search.openstack.org/widget/embed.min.js?t="+Date.now(); tag.parentNode.insertBefore(script, tag); }; window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader); })(window, document); </script> <nav class="navbar navbar-default" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button class="navbar-toggle" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="brand-wrapper"> <a class="navbar-brand" href="https://www.openstack.org/"></a> </div> <div class="search-icon show"><i class="fa fa-search"></i> Search</div></div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="search-container tiny"> <div class="openstack-search-bar" data-baseUrl="search.openstack.org" data-context="docs-openstack"></div> </div> <ul class="nav navbar-nav navbar-main show"> <li class="search-container-mobile"> <div class="openstack-search-bar" data-baseUrl="search.openstack.org" data-context="docs-openstack"></div> </li> <li> <!--Software --> <a href="https://www.openstack.org/software/" class="drop" id="dropdownMenuSoftware">Software <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuSoftware"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/software/">Overview</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/software/project-navigator/openstack-components">OpenStack Components</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/software/project-navigator/sdks">SDKs</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/software/project-navigator/deployment-tools">Deployment Tools</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/assets/software/projectmap/openstack-map.pdf" target="_blank">OpenStack Map</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/software/sample-configs/">Sample Configs</a></li> </ul> </li> <li> <!-- Use Cases --> <a href="https://www.openstack.org/use-cases/" class="drop" id="dropdownMenuUsers">Use Cases <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuUsers"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/">Users in Production</a></li> <li role="presentation" class="divider"></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/bare-metal/">Ironic Bare Metal</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/edge-computing/">Edge Computing</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/telecoms-and-nfv/">Telecom &amp; NFV</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/science/">Science and HPC</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/containers/">Containers</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/use-cases/enterprise/">Enterprise</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/surveys/landing">User Survey</a></li> </ul> </li> <li> <!-- Events --> <a href="https://www.openstack.org/events/" class="drop" id="dropdownMenuEvents">Events <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuEvents"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/summit/">Open Infrastructure Summits</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/ptg/">Project Teams Gathering</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/events/opendev-2020/">OpenDev</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/events/community-events/">Community Events</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/events/openstackdays">OpenStack &amp; OpenInfra Days</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/videos/">Summit Videos</a></li> </ul> </li> <li><!-- Community --> <a href="https://www.openstack.org/community/" class="drop" id="dropdownMenuCommunity">Community <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuCommunity"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/community/">Welcome! Start Here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/community/tech-committee">OpenStack Technical Committee</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/community/speakers/">Speakers Bureau</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://wiki.openstack.org">OpenStack Wiki</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/coa/">Get Certified (COA)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/community/jobs/">Jobs</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketing/">Marketing Resources</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/news/">Community News</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://superuser.openstack.org">Superuser Magazine</a></li> <li role="presentation" class="divider"></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/community/supporting-organizations/">OpenInfra Foundation Supporting Organizations</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://openinfra.dev">Open Infrastructure Foundation (OpenInfra Foundation)</a></li> </ul> </li> <li><!-- Marketplace --> <a href="https://www.openstack.org/marketplace/" class="drop" id="dropdownMenuLearn">Marketplace <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu dropdown-hover" role="menu" aria-labelledby="dropdownMenuEvents"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/training/">Training</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/distros/">Distros &amp; Appliances</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/public-clouds/">Public Clouds</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/hosted-private-clouds/">Hosted Private Clouds</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/remotely-managed-private-clouds/">Remotely Managed Private Clouds</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/consulting/">Consulting &amp; Integrators</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/marketplace/drivers/">Drivers</a></li> </ul> </li> <li><!-- Blog --> <a href="https://www.openstack.org/blog/">Blog</a> </li> <li><!-- Docs --> <a href="http://docs.openstack.org/">Docs</a> </li> <li class="join-nav-section"> <!-- Join --> <a href="https://openinfra.dev/join/" id="dropdownMenuJoin">Join <i class="fa fa-caret-down"></i></a> <ul class="dropdown-menu dropdown-hover" role="menu" aria-labelledby="dropdownMenuJoin" style="display: none;"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://openinfra.dev/join/">Sign up for Foundation Membership</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://openinfra.dev/join/">Sponsor the Foundation</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://openinfra.dev">More about the Foundation</a></li> </ul> </li> <li> <!-- Login --> <a href="https://www.openstack.org/Security/login/?BackURL=/home/" class="sign-in-btn">Log In</a> </li> </ul> </div> </div> <!-- /.container --> </nav> <div class="container docs-book-wrapper"> <div class="row"> <div class="col-lg-9 col-md-8 col-sm-8 col-lg-push-3 col-md-push-4 col-sm-push-4"> <div class="row docs-title"> <div class="col-lg-8"> <h1>Setting Up Your Gerrit Account</h1> </div> <div class="docs-actions"> <a href="git.html"><i class="fa fa-angle-double-left" data-toggle="tooltip" data-placement="top" title="Previous: Setup and Learn GIT"></i></a> <a href="../code-and-documentation/patch-best-practices.html"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: How to Become a Patch Guru?"></i></a> <a id="logABugLink1" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="docs-body" role="main"> <p>[ <a class="reference external" href="../common/setup-gerrit.html">English</a> | <a class="reference external" href="../id/common/setup-gerrit.html">Indonesia</a> | <a class="reference external" href="../ko_KR/common/setup-gerrit.html">한국어 (대한민국)</a> | <a class="reference external" href="../es_MX/common/setup-gerrit.html">español (México)</a> | <a class="reference external" href="../en_GB/common/setup-gerrit.html">English (United Kingdom)</a> | <a class="reference external" href="../de/common/setup-gerrit.html">Deutsch</a> | <a class="reference external" href="../zh_CN/common/setup-gerrit.html">中文 (简体, 中国)</a> ]</p> <section id="setting-up-your-gerrit-account"> <h1>Setting Up Your Gerrit Account<a class="headerlink" href="#setting-up-your-gerrit-account" title="Link to this heading">¶</a></h1> <div class="admonition note"> <p class="admonition-title">Note</p> <p>This section assumes you have completed <a class="reference internal" href="git.html"><span class="doc">Setup and Learn GIT</span></a> guide.</p> </div> <section id="what-is-gerrit"> <span id="id1"></span><h2>What is Gerrit?<a class="headerlink" href="#what-is-gerrit" title="Link to this heading">¶</a></h2> <p>This is the review system the OpenStack community uses.</p> <p>Gerrit allows you to review:</p> <ul class="simple"> <li><p><a class="reference external" href="https://opendev.org/explore/repos">Code, docs, infrastructure changes, and CI configurations</a></p></li> <li><p><a class="reference external" href="https://specs.openstack.org">Specifications</a></p></li> <li><p><a class="reference external" href="https://opendev.org/openstack/i18n/">Translations</a></p></li> <li><p><a class="reference external" href="https://specs.openstack.org/openstack/openstack-user-stories/">Use cases for features</a></p></li> </ul> </section> <section id="sign-up"> <h2>Sign Up<a class="headerlink" href="#sign-up" title="Link to this heading">¶</a></h2> <ol class="arabic simple"> <li><p>Visit <a class="reference external" href="https://review.opendev.org">OpenStack’s Gerrit page</a> and click the <strong>sign in</strong> link.</p></li> <li><p>You will be prompted to select a username. You can enter the same one you did for Launchpad, or something else.</p></li> </ol> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Choose and type your username carefully. Once it is set, you cannot change the username.</p> </div> <div class="admonition note"> <p class="admonition-title">Note</p> <p>From here on out when you sign into Gerrit, you’ll be prompted to enter your Launchpad login info. This is because Gerrit uses it as an OpenID single sign on.</p> </div> </section> <section id="individual-contributor-license-agreement-icla"> <span id="individual-contributor-license-agreement"></span><h2>Individual Contributor License Agreement (ICLA)<a class="headerlink" href="#individual-contributor-license-agreement-icla" title="Link to this heading">¶</a></h2> <section id="what-is-it"> <h3>What is it?<a class="headerlink" href="#what-is-it" title="Link to this heading">¶</a></h3> <p>An agreement to clarify intellectual property rights granted with contributions from a person or entity. <a class="reference external" href="https://review.opendev.org/static/cla.html">Preview the full agreement</a>.</p> </section> <section id="signing-it"> <h3>Signing it<a class="headerlink" href="#signing-it" title="Link to this heading">¶</a></h3> <section id="individual-contributors"> <h4>Individual Contributors<a class="headerlink" href="#individual-contributors" title="Link to this heading">¶</a></h4> <ol class="arabic simple"> <li><p>In Gerrit’s <a class="reference external" href="https://review.opendev.org/#/settings/agreements">settings</a> click the <strong>New Contributor Agreement</strong> link and sign the agreement. You need this to contribute code &amp; documentation. You will not be able to push patches to Gerrit without this.</p></li> </ol> <a class="reference internal image-reference" href="../_images/3.png"><img alt="../_images/3.png" class="align-center" src="../_images/3.png" style="width: 518.6999999999999px; height: 266.0px;" /></a> </section> <section id="contributors-from-a-company-or-organization"> <h4>Contributors From a Company or Organization<a class="headerlink" href="#contributors-from-a-company-or-organization" title="Link to this heading">¶</a></h4> <p>If you are contributing on behalf of a company or organization, please make sure that you sign the ICLA <strong>AND</strong> also get added to the list of contributors on your company’s Corporate Contributor License Agreement (CCLA). You will need to complete both of these steps before being able to contribute.</p> <ol class="arabic"> <li><p>In Gerrit’s <a class="reference external" href="https://review.opendev.org/#/settings/agreements">settings</a> click the <strong>New Contributor Agreement</strong> link and sign the agreement.</p> <a class="reference internal image-reference" href="../_images/3.png"><img alt="../_images/3.png" class="align-center" src="../_images/3.png" style="width: 518.6999999999999px; height: 266.0px;" /></a> </li> <li><p>An employer with the appropriate signing rights of the company or organization needs to sign the <a class="reference external" href="https://secure.echosign.com/public/hostedForm?formid=56JUVGT95E78X5">Corporate Contributor License Agreement</a>.</p></li> <li><p>If the CCLA only needs to be extended follow <a class="reference external" href="https://wiki.openstack.org/wiki/HowToUpdateCorporateCLA">this</a> procedure.</p></li> </ol> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Employers can update the list of authorized employees by filling out and signing an <a class="reference external" href="https://openstack.echosign.com/public/hostedForm?formid=56JUVP6K4Z6P4C">Updated Schedule A Form</a>.</p> </div> </section> <section id="contributors-from-the-u-s-government"> <h4>Contributors From the U.S. Government<a class="headerlink" href="#contributors-from-the-u-s-government" title="Link to this heading">¶</a></h4> <p>Someone of authority needs to sign the <a class="reference external" href="https://wiki.openstack.org/wiki/GovernmentCLA">U.S. Government Contributor License Agreement</a>. Contact the <a class="reference external" href="mailto:communitymngr&#37;&#52;&#48;openstack&#46;org">Open Infrastructure Foundation</a> to initiate this process.</p> </section> </section> </section> <section id="setup-ssh-keys"> <h2>Setup SSH Keys<a class="headerlink" href="#setup-ssh-keys" title="Link to this heading">¶</a></h2> <section id="what-are-they"> <h3>What are they?<a class="headerlink" href="#what-are-they" title="Link to this heading">¶</a></h3> <p>In order to push things to <a class="reference external" href="https://review.opendev.org">Gerrit</a> we need to have a way to identify ourselves. We will do this using SSH keys which allows us to have our machine we’re pushing a change from to perform a <a class="reference external" href="https://en.wikipedia.org/wiki/Challenge-response_authentication">challenge-response authentication</a> with the Gerrit server.</p> <p>SSH keys are always generated in pairs:</p> <ul class="simple"> <li><p><strong>Private key</strong> - Only known to you and it should be safely guarded.</p></li> <li><p><strong>Public key</strong> - Can be shared freely with any SSH server you wish to connect to.</p></li> </ul> <p>In summary, you will be generating a SSH key pair, and providing the Gerrit server with your public key. With your system holding the private key, it will have no problem replying to Gerrit during the challenge-response authentication.</p> <p>Some people choose to use one SSH key pair to access many systems while others prefer to use separate key pairs. Both options are covered in the following sections.</p> </section> <section id="check-for-existing-keys"> <h3>Check For Existing Keys<a class="headerlink" href="#check-for-existing-keys" title="Link to this heading">¶</a></h3> <p>Open your terminal program and type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ls</span> <span class="o">-</span><span class="n">la</span> <span class="o">~/.</span><span class="n">ssh</span> </pre></div> </div> <p>Typically public key filenames will look like:</p> <ul class="simple"> <li><p>id_dsa.pub</p></li> <li><p>id_ecdsa.pub</p></li> <li><p>id_ed25519.pub</p></li> <li><p>id_rsa.pub</p></li> </ul> <p>If you don’t see .pub extension file or want to generate a specific set for OpenStack Gerrit, you need to generate keys.</p> </section> <section id="generate-ssh-key-pairs"> <h3>Generate SSH Key Pairs<a class="headerlink" href="#generate-ssh-key-pairs" title="Link to this heading">¶</a></h3> <div class="admonition note"> <p class="admonition-title">Note</p> <p>This guide recommends using <code class="docutils literal notranslate"><span class="pre">ed25519</span></code> keys because it has been found that this type works well across all operating systems.</p> </div> <section id="generating-the-default-or-initial-ssh-key-pair"> <h4>Generating The Default Or Initial SSH Key Pair<a class="headerlink" href="#generating-the-default-or-initial-ssh-key-pair" title="Link to this heading">¶</a></h4> <p>You can generate a new SSH key pair using the provided email as a label by going into your terminal program and typing:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span><span class="o">-</span><span class="n">keygen</span> <span class="o">-</span><span class="n">t</span> <span class="n">ed25519</span> <span class="o">-</span><span class="n">C</span> <span class="s2">&quot;your_email@example.com&quot;</span> </pre></div> </div> <p>When you’re prompted to “Enter a file in which to save the key” press Enter. This accepts the default location:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Enter</span> <span class="n">a</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">which</span> <span class="n">to</span> <span class="n">save</span> <span class="n">the</span> <span class="n">key</span> <span class="p">(</span><span class="o">/</span><span class="n">Users</span><span class="o">/</span><span class="n">you</span><span class="o">/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_ed25519</span><span class="p">):</span> <span class="p">[</span><span class="n">Press</span> <span class="n">enter</span><span class="p">]</span> </pre></div> </div> <p>At the prompt, type a secure passphrase, you may enter one or press Enter to have no passphrase:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Enter</span> <span class="n">passphrase</span> <span class="p">(</span><span class="n">empty</span> <span class="k">for</span> <span class="n">no</span> <span class="n">passphrase</span><span class="p">):</span> <span class="p">[</span><span class="n">Type</span> <span class="n">a</span> <span class="n">passphrase</span><span class="p">]</span> <span class="n">Enter</span> <span class="n">same</span> <span class="n">passphrase</span> <span class="n">again</span><span class="p">:</span> <span class="p">[</span><span class="n">Type</span> <span class="n">passphrase</span> <span class="n">again</span><span class="p">]</span> </pre></div> </div> </section> <section id="generating-a-separate-key-pair-for-openstack-gerrit-optional"> <h4>Generating A Separate Key Pair For OpenStack Gerrit (optional)<a class="headerlink" href="#generating-a-separate-key-pair-for-openstack-gerrit-optional" title="Link to this heading">¶</a></h4> <p>You can generate a new SSH key using the provided email as a label by going into your terminal program and typing:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span><span class="o">-</span><span class="n">keygen</span> <span class="o">-</span><span class="n">t</span> <span class="n">ed25519</span> <span class="o">-</span><span class="n">C</span> <span class="s2">&quot;your_email@example.com&quot;</span> </pre></div> </div> <p>When you’re prompted to “Enter a file in which to save the key” you must specify the name of the new key pair and then press Enter:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Enter</span> <span class="n">a</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">which</span> <span class="n">to</span> <span class="n">save</span> <span class="n">the</span> <span class="n">key</span> <span class="p">(</span><span class="o">/</span><span class="n">Users</span><span class="o">/</span><span class="n">you</span><span class="o">/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_ed25519</span><span class="p">):</span> <span class="o">/</span><span class="n">Users</span><span class="o">/</span><span class="n">you</span><span class="o">/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_openstack_ed25519</span> </pre></div> </div> <p>At the prompt, type a secure passphrase, you may enter one or press Enter to have no passphrase:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Enter</span> <span class="n">passphrase</span> <span class="p">(</span><span class="n">empty</span> <span class="k">for</span> <span class="n">no</span> <span class="n">passphrase</span><span class="p">):</span> <span class="p">[</span><span class="n">Type</span> <span class="n">a</span> <span class="n">passphrase</span><span class="p">]</span> <span class="n">Enter</span> <span class="n">same</span> <span class="n">passphrase</span> <span class="n">again</span><span class="p">:</span> <span class="p">[</span><span class="n">Type</span> <span class="n">passphrase</span> <span class="n">again</span><span class="p">]</span> </pre></div> </div> <p>Finally you need to tell ssh what host(s) to associate SSH keys with. To do this open “~/.ssh/config” in an editor, create the file if it doesn’t exist and add something like:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Host</span> <span class="n">review</span><span class="o">.</span><span class="n">opendev</span><span class="o">.</span><span class="n">org</span> <span class="n">review</span> <span class="n">Hostname</span> <span class="n">review</span><span class="o">.</span><span class="n">opendev</span><span class="o">.</span><span class="n">org</span> <span class="n">Port</span> <span class="mi">29418</span> <span class="n">User</span> <span class="o">&lt;</span><span class="n">your_gerrit_username</span><span class="o">&gt;</span> <span class="n">IdentityFile</span> <span class="o">~/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_openstack_ed25519</span> </pre></div> </div> </section> </section> <section id="copy-public-key"> <h3>Copy Public Key<a class="headerlink" href="#copy-public-key" title="Link to this heading">¶</a></h3> <section id="mac-os-linux"> <h4>Mac OS &amp; Linux<a class="headerlink" href="#mac-os-linux" title="Link to this heading">¶</a></h4> <p>From your terminal type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">~/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_ed25519</span><span class="o">.</span><span class="n">pub</span> </pre></div> </div> <p>Or if you created a separate key pair, assuming the example name above:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">~/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_openstack_ed25519</span><span class="o">.</span><span class="n">pub</span> </pre></div> </div> <p>Select and copy the output.</p> </section> </section> <section id="import-public-key-into-gerrit"> <h3>Import Public Key Into Gerrit<a class="headerlink" href="#import-public-key-into-gerrit" title="Link to this heading">¶</a></h3> <ol class="arabic simple"> <li><p>Go to <a class="reference external" href="https://review.opendev.org/settings/#SSHKeys">Gerrit’s SSH Keys section in User Settings</a>.</p></li> <li><p>Paste the public key into the <strong>New SSH Key</strong> text box.</p></li> <li><p>Click the ‘ADD NEW SSH KEY’ button.</p></li> </ol> </section> </section> <section id="git-review"> <h2>Git Review<a class="headerlink" href="#git-review" title="Link to this heading">¶</a></h2> <section id="id3"> <h3>What is it?<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3> <p>Git review is a tool maintained by the OpenStack community. It adds an additional sub-command to ‘git’ like so:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">review</span> </pre></div> </div> <p>When you have changes in an OpenStack project repository, you can use this sub-command to have the changes posted to <a class="reference external" href="https://review.opendev.org/">Gerrit</a> so that they can be reviewed.</p> </section> <section id="installation"> <h3>Installation<a class="headerlink" href="#installation" title="Link to this heading">¶</a></h3> <section id="mac-os"> <h4>Mac OS<a class="headerlink" href="#mac-os" title="Link to this heading">¶</a></h4> <p>In a terminal type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> <p>If you don’t have pip installed already, follow the <a class="reference external" href="https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py">installation documentation</a> for pip.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Mac OS X El Capitan and Mac OS Sierra users might see an error message like “Operation not permitted” when installing with the command. In this case, there are two options to successfully install git-review.</p> <p>Option 1: install using pip with more options:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">install</span><span class="o">-</span><span class="n">option</span> <span class="s1">&#39;--install-data=/usr/local&#39;</span> <span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> <p>Option 2: Use the package manager <a class="reference external" href="https://brew.sh">Homebrew</a>, and type in a terminal:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">brew</span> <span class="n">install</span> <span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> </div> </section> <section id="linux"> <h4>Linux<a class="headerlink" href="#linux" title="Link to this heading">¶</a></h4> <p>For distributions like Debian, Ubuntu, or Mint open a terminal and type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> <p>For distributions like RedHat, Fedora or CentOS open a terminal and type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">dnf</span> <span class="n">install</span> <span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> <p>For SUSE distributions open a terminal and type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">zypper</span> <span class="ow">in</span> <span class="n">python</span><span class="o">-</span><span class="n">git</span><span class="o">-</span><span class="n">review</span> </pre></div> </div> </section> </section> <section id="configuration"> <h3>Configuration<a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h3> <p>Git review assumes the user you’re running it as is the same as your Gerrit username. If it’s not, you can tell it by setting this git config setting:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">config</span> <span class="o">--</span><span class="k">global</span> <span class="n">gitreview</span><span class="o">.</span><span class="n">username</span> <span class="o">&lt;</span><span class="n">username</span><span class="o">&gt;</span> </pre></div> </div> <p>If you don’t know what your Gerrit username is, you can check the <a class="reference external" href="https://review.opendev.org/#/settings/">Gerrit settings</a>.</p> </section> <section id="preparing-to-send-a-review"> <h3>Preparing to Send a Review<a class="headerlink" href="#preparing-to-send-a-review" title="Link to this heading">¶</a></h3> <p>Before doing <strong>git commit</strong> on your patch it is important to initialize git review. Use the following command to do the initial git review configuration in your repository:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">review</span> <span class="o">-</span><span class="n">s</span> </pre></div> </div> <p>The command sets up the necessary remote hosts and commit hooks to enable pushing changes to Gerrit.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Git review only needs to be initialized once in a repository.</p> </div> </section> </section> </section> </div> </div> </div> <div class="docs-actions"> <a href="git.html"><i class="fa fa-angle-double-left" data-toggle="tooltip" data-placement="top" title="Previous: Setup and Learn GIT"></i></a> <a href="../code-and-documentation/patch-best-practices.html"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: How to Become a Patch Guru?"></i></a> <a id="logABugLink3" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a> </div> <div class="row docs-byline bottom"> <div class="docs-updated">this page last updated: 2024-08-18 16:09:37</div> </div> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-8 docs-license"> <a href="https://creativecommons.org/licenses/by/3.0/"> <img src="../_static/images/docs/license.png" alt="Creative Commons Attribution 3.0 License"/> </a> <p> Except where otherwise noted, this document is licensed under <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>. See all <a href="https://www.openstack.org/legal"> OpenStack Legal Documents</a>. </p> </div> <div class="col-lg-4 col-md-4 col-sm-4 docs-actions-wrapper"> <!-- ID buglinkbottom added so that pre-filled doc bugs are sent to Launchpad projects related to the document --> <a href="#" id="logABugLink2" class="docs-footer-actions"><i class="fa fa-bug"></i> found an error? report a bug</a> </div> </div> </div> <div class="col-lg-3 col-md-4 col-sm-4 col-lg-pull-9 col-md-pull-8 col-sm-pull-8 docs-sidebar"> <div class="btn-group docs-sidebar-releases"> <button onclick="location.href='/'" class="btn docs-sidebar-home" data-toggle="tooltip" data-placement="top" title="OpenStack Docs Home"><i class="fa fa-arrow-circle-o-left"></i></button> <button type="button" data-toggle="dropdown" class="btn docs-sidebar-release-select">OpenStack Documentation<i class="fa fa-caret-down"></i></button> <ul class="dropdown-menu docs-sidebar-dropdown" role="menu"> <li role="presentation" class="dropdown-header">Guides</li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#install-guides">Install Guides</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#user-guides">User Guides</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#configuration-guides">Configuration Guides</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#ops-and-admin-guides">Operations and Administration Guides</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#api-guides">API Guides</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/index.html#contributor-guides">Contributor Guides</a></li> <li role="presentation" class="dropdown-header">Languages</li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/de/">Deutsch (German)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/fr/">Français (French)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/id/">Bahasa Indonesia (Indonesian)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/it/">Italiano (Italian)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/ja/">日本語 (Japanese)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/ko_KR/">한국어 (Korean)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/pt_BR/">Português (Portuguese)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/tr_TR/">Türkçe (Türkiye)</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.openstack.org/zh_CN/">简体中文 (Simplified Chinese)</a></li> </ul> </div> <div class="docs-sidebar-toc"> <div class="docs-sidebar-section" id="table-of-contents"> <a href="../index.html" class="docs-sidebar-section-title"><h4>contributor-guide </h4></a> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="../code-and-documentation/index.html">Code &amp; Documentation Contributor Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../non-code-contribution/index.html">Non-Code Contributor Guide</a></li> <li class="toctree-l1 current"><a class="reference internal" href="../users/index.html">Users’ Contributor Guide</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="../users/introduction.html">Introduction</a></li> <li class="toctree-l2"><a class="reference internal" href="irc.html">Setup IRC</a></li> <li class="toctree-l2"><a class="reference internal" href="accounts.html">Account Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="communication.html">Communication</a></li> <li class="toctree-l2"><a class="reference internal" href="events.html">Events</a></li> <li class="toctree-l2"><a class="reference internal" href="git.html">Setup and Learn GIT</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Setting Up Your Gerrit Account</a></li> <li class="toctree-l2"><a class="reference internal" href="governance.html">OpenStack Governance</a></li> <li class="toctree-l2"><a class="reference internal" href="releases.html">Releases</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../operators/index.html">Operators’ Contributor Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../organizations/index.html">Contributing Organization Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../contributing/index.html">Contributing to the Contributor Guide</a></li> </ul> </div> <div class="docs-sidebar-toc"> <div class="docs-sidebar-section" id="local-table-of-contents"> <h4 class="docs-sidebar-section-title">Page Contents</h4> <ul> <li><a class="reference internal" href="#">Setting Up Your Gerrit Account</a><ul> <li><a class="reference internal" href="#what-is-gerrit">What is Gerrit?</a></li> <li><a class="reference internal" href="#sign-up">Sign Up</a></li> <li><a class="reference internal" href="#individual-contributor-license-agreement-icla">Individual Contributor License Agreement (ICLA)</a><ul> <li><a class="reference internal" href="#what-is-it">What is it?</a></li> <li><a class="reference internal" href="#signing-it">Signing it</a><ul> <li><a class="reference internal" href="#individual-contributors">Individual Contributors</a></li> <li><a class="reference internal" href="#contributors-from-a-company-or-organization">Contributors From a Company or Organization</a></li> <li><a class="reference internal" href="#contributors-from-the-u-s-government">Contributors From the U.S. Government</a></li> </ul> </li> </ul> </li> <li><a class="reference internal" href="#setup-ssh-keys">Setup SSH Keys</a><ul> <li><a class="reference internal" href="#what-are-they">What are they?</a></li> <li><a class="reference internal" href="#check-for-existing-keys">Check For Existing Keys</a></li> <li><a class="reference internal" href="#generate-ssh-key-pairs">Generate SSH Key Pairs</a><ul> <li><a class="reference internal" href="#generating-the-default-or-initial-ssh-key-pair">Generating The Default Or Initial SSH Key Pair</a></li> <li><a class="reference internal" href="#generating-a-separate-key-pair-for-openstack-gerrit-optional">Generating A Separate Key Pair For OpenStack Gerrit (optional)</a></li> </ul> </li> <li><a class="reference internal" href="#copy-public-key">Copy Public Key</a><ul> <li><a class="reference internal" href="#mac-os-linux">Mac OS &amp; Linux</a></li> </ul> </li> <li><a class="reference internal" href="#import-public-key-into-gerrit">Import Public Key Into Gerrit</a></li> </ul> </li> <li><a class="reference internal" href="#git-review">Git Review</a><ul> <li><a class="reference internal" href="#id3">What is it?</a></li> <li><a class="reference internal" href="#installation">Installation</a><ul> <li><a class="reference internal" href="#mac-os">Mac OS</a></li> <li><a class="reference internal" href="#linux">Linux</a></li> </ul> </li> <li><a class="reference internal" href="#configuration">Configuration</a></li> <li><a class="reference internal" href="#preparing-to-send-a-review">Preparing to Send a Review</a></li> </ul> </li> </ul> </li> </ul> </div> </div> </div> </div> </div> </div> <footer> <div class="container"> <div class="row footer-links"> <div class="col-lg-2 col-sm-2"> <h3>OpenStack</h3> <ul> <li><a href="https://www.openstack.org/software/project-navigator/">Projects</a></li> <li><a href="https://security.openstack.org/">OpenStack Security</a></li> <li><a href="https://openstack.org/blog/">Blog</a></li> <li><a href="https://openstack.org/news/">News</a></li> </ul> </div> <div class="col-lg-2 col-sm-2"> <h3>Community</h3> <ul> <li><a href="https://www.meetup.com/pro/openinfradev/">User Groups</a></li> <li><a href="https://openstack.org/community/events/">Events</a></li> <li><a href="https://openstack.org/community/jobs/">Jobs</a></li> <li><a href="https://openinfra.dev/members/">Companies</a></li> <li><a href="https://docs.openstack.org/contributors">Contribute</a></li> </ul> </div> <div class="col-lg-2 col-sm-2"> <h3>Documentation</h3> <ul> <li><a href="https://docs.openstack.org">OpenStack Manuals</a></li> <li><a href="https://openstack.org/software/start/">Getting Started</a></li> <li><a href="https://developer.openstack.org">API Documentation</a></li> <li><a href="https://wiki.openstack.org">Wiki</a></li> </ul> </div> <div class="col-lg-2 col-sm-2"> <h3>Branding &amp; Legal</h3> <ul> <li><a href="https://openinfra.dev/legal">Legal Docs</a></li> <li><a href="https://openstack.org/brand/">Logos &amp; Guidelines</a></li> <li><a href="https://openinfra.dev/legal/trademark-policy">Trademark Policy</a></li> <li><a href="https://openinfra.dev/privacy-policy">Privacy Policy</a></li> <li><a href="https://docs.openstack.org/contributors/common/setup-gerrit.html#individual-contributor-license-agreement">OpenInfra CLA</a></li> </ul> </div> <div class="col-lg-4 col-sm-4"> <h3>Stay In Touch</h3> <a href="https://twitter.com/OpenStack" target="_blank" class="social-icons footer-twitter"></a> <a href="https://www.facebook.com/openinfradev" target="_blank" class="social-icons footer-facebook"></a> <a href="https://www.linkedin.com/company/open-infrastructure-foundation" target="_blank" class="social-icons footer-linkedin"></a> <a href="https://www.youtube.com/user/OpenStackFoundation" target="_blank" class="social-icons footer-youtube"></a> <p class="fine-print"> The OpenStack project is provided under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>. Docs.openstack.org is powered by <a href="https://rackspace.com" target="_blank">Rackspace Cloud Computing</a>. </p> </div> </div> </div> </footer> <!-- jQuery --> <script src="../_static/js/jquery-3.2.1.min.js"></script> <!-- Bootstrap JavaScript --> <script src="../_static/js/bootstrap.min.js"></script> <!-- The rest of the JS --> <script src="../_static/js/navigation.js"></script> <!-- Docs JS --> <script src="../_static/js/docs.js"></script> <!-- Javascript for page --> <script> /* Build a description of this page including SHA, source location on git * repo, build time and the project's launchpad bug tag. Set the HREF of the * bug buttons */ var lineFeed = "%0A"; var gitURL = "Source: Can't derive source file URL"; /* there have been cases where "pagename" wasn't set; better check for it */ /* "giturl" is the URL of the source file on Git and is auto-generated by * openstackdocstheme. * * "pagename" is a standard sphinx parameter containing the name of * the source file, without extension. */ var sourceFile = "common/setup-gerrit" + ".rst"; gitURL = "Source: https://opendev.org/openstack/contributor-guide/src/doc/source" + "/" + sourceFile; /* gitsha, project and bug_tag rely on variables in conf.py */ var gitSha = "SHA: bd6a06edea4c7bd56c49f52921c34ff14d3a84a1"; var repositoryName = "openstack/contributor-guide"; var bugProject = "openstack/contributor-guide"; var bugTitle = "Setting Up Your Gerrit Account in contributor-guide"; var fieldTags = ""; var useStoryboard = "True"; /* "last_updated" is the build date and time. It relies on the conf.py variable "html_last_updated_fmt", which should include year/month/day as well as hours and minutes */ var buildstring = "Release: on 2024-08-18 16:09:37"; var fieldComment = encodeURI(buildstring) + lineFeed + encodeURI(gitSha) + lineFeed + encodeURI(gitURL) ; logABug(bugTitle, bugProject, fieldComment, fieldTags, repositoryName, useStoryboard); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10