Setup ssh key with git/github: Clone private repo using ssh

<p>f you already have a rsa key pair, skip this step and use the same keys. Otherwise, use below command to generate a new public-private key pair. Works on windows, mac and linux.<br /> Replace&nbsp;<code>[email protected]</code>&nbsp;with your&nbsp;<strong>github email id</strong>.</p> <pre> ssh-keygen -t rsa -b 4096 -C &quot;youremail@something&quot;</pre> <p>Notice it&rsquo;s capital&nbsp;<code>C</code>&nbsp;.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*ssCIe1cjdEECbAUtazQoxQ.png" style="height:89px; width:700px" /></p> <p>keygen on windows</p> <p>When asked for location and file name, hit enter to save to default location.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:681/1*-K8rpPqhKoOkIHWs0uJaHQ.png" style="height:28px; width:681px" /></p> <p>passphrase prompt</p> <p>When asked for&nbsp;<strong>passphrase,&nbsp;</strong>either type a secret passphrase and hit Enter, or to leave empty hit Enter twice.</p> <p>This generates 2 files:</p> <ol> <li>A public key ending with&nbsp;<code>.pub</code></li> <li>A private key without any extension (this is secret and should never be shared)</li> </ol> <p><a href="https://leangaurav.medium.com/setup-ssh-key-with-git-github-clone-private-repo-using-ssh-d983ab7bb956"><strong>Click Here</strong></a></p>
Tags: private Clone