You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><ahref="#setting-up-your-github-token" id="toc-setting-up-your-github-token" class="nav-link" data-scroll-target="#setting-up-your-github-token">Setting up your GitHub Token</a></li>
416
+
<li><ahref="#setting-up-your-ssh-key" id="toc-setting-up-your-ssh-key" class="nav-link" data-scroll-target="#setting-up-your-ssh-key">Setting up your SSH key</a></li>
413
417
</ul></li>
414
418
<li><ahref="#clone-a-repository" id="toc-clone-a-repository" class="nav-link" data-scroll-target="#clone-a-repository">Clone a repository</a></li>
415
419
<li><ahref="#tracking-your-work" id="toc-tracking-your-work" class="nav-link" data-scroll-target="#tracking-your-work">Tracking your work</a></li>
<p>Problem with any of those steps? Check out Jenny Brian <ahref="http://happygitwithr.com/troubleshooting.html" target="_blank">Happy git trouble shooting section</a></p>
<p>Normally if you have already used GitHub tokens your Operating System (Windows, MacOSX, …) should have cached the necessary credentials to log in to your GitHub account (necessary to be able to push (write) content to the remote repository).</p>
<h3class="anchored" data-anchor-id="setting-up-your-github-token">Setting up your GitHub Token</h3>
473
478
<p>You can find the latest guidelines on how to setup your personal GitHub token <strong><ahref="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic">here</a></strong></p>
474
479
<oltype="1">
475
480
<li><p>Choose a token name that is related to the machine you are using (not requires, but a good idea :) )</p></li>
@@ -488,20 +493,20 @@ <h4 class="anchored" data-anchor-id="setting-up-your-github-token">Setting up yo
488
493
<p>Copy your token to your clipboard and then push to GitHub from the command line using <code>git push</code>. When you are prompted for your password, copy your token.</p>
489
494
<p>Only once it has worked and that your token as been cached by your OS password manager you can close the GitHub webpage displaying your token value.</p>
<h3class="anchored" data-anchor-id="setting-up-your-ssh-key">Setting up your SSH key</h3>
493
498
<p>Another option is to set up the method that is commonly used by many different services to authenticate access on the command line. This method is called Secure Shell Protocol (SSH). SSH is a cryptographic network protocol that allows secure communication between computers using an otherwise insecure network.</p>
494
499
<p>SSH uses what is called a key pair. This is <strong>two</strong> keys that work together to validate access. One key is publicly known and called the <strong>public key</strong>, and the other key called the <strong>private key</strong> is kept private. Very descriptive names.</p>
495
500
<p>You can think of the public key as a padlock, and only you have the key (the private key) to open it. You use the public key where you want a secure method of communication, such as your GitHub account. You give this padlock, or public key, to GitHub and say “lock the communications to my account with this so that only computers that have my private key can unlock communications and send git commands as my GitHub account.”</p>
496
501
<p>The first thing we are going to do is check if this has already been done on the computer you’re on. Because generally speaking, this setup only needs to happen once and then you can forget about it:</p>
<p>Your output is going to look a little different depending on whether or not SSH has ever been set up on the computer you are using.</p>
499
-
<sectionid="already-set-up" class="level5">
500
-
<h5class="anchored" data-anchor-id="already-set-up">Already set up:</h5>
504
+
<sectionid="already-set-up" class="level4">
505
+
<h4class="anchored" data-anchor-id="already-set-up">Already set up:</h4>
501
506
<p>If SSH has been set up on the computer you’re using, the public and private key pairs will be listed. The file names are either <code>id_ed25519</code>/<code>id_ed25519.pub</code> or <code>id_rsa</code>/<code>id_rsa.pub</code> depending on how the key pairs were set up.</p>
502
507
</section>
503
-
<sectionid="not-set-up" class="level5">
504
-
<h5class="anchored" data-anchor-id="not-set-up">Not Set up:</h5>
508
+
<sectionid="not-set-up" class="level4">
509
+
<h4class="anchored" data-anchor-id="not-set-up">Not Set up:</h4>
505
510
<divclass="sourceCode" id="cb7"><preclass="sourceCode bash code-with-copy"><codeclass="sourceCode bash"><spanid="cb7-1"><ahref="#cb7-1" aria-hidden="true" tabindex="-1"></a><spanclass="ex">ls:</span> cannot access <spanclass="st">'/Users/brunj7/.ssh'</span>: No such file or directory</span></code><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></pre></div>
506
511
<p>Create an SSH key pair</p>
507
512
<p>To create an SSH key pair Vlad uses this command, where the <code>-t</code> option specifies which type of algorithm to use and <code>-C</code> attaches a comment to the key (here, Vlad’s email):</p>
@@ -555,7 +560,6 @@ <h5 class="anchored" data-anchor-id="not-set-up">Not Set up:</h5>
555
560
</section>
556
561
</section>
557
562
</section>
558
-
</section>
559
563
<sectionid="clone-a-repository" class="level2">
560
564
<h2class="anchored" data-anchor-id="clone-a-repository">Clone a repository</h2>
0 commit comments