summaryrefslogtreecommitdiff
path: root/_posts/2009-06-13-win-set-up-git.markdown
diff options
context:
space:
mode:
Diffstat (limited to '_posts/2009-06-13-win-set-up-git.markdown')
-rw-r--r--_posts/2009-06-13-win-set-up-git.markdown102
1 files changed, 3 insertions, 99 deletions
diff --git a/_posts/2009-06-13-win-set-up-git.markdown b/_posts/2009-06-13-win-set-up-git.markdown
index ac694c5..63f85ad 100644
--- a/_posts/2009-06-13-win-set-up-git.markdown
+++ b/_posts/2009-06-13-win-set-up-git.markdown
@@ -70,107 +70,11 @@ To make sure you generate a brand new key, you need to check if one already exis
</div>
</div>
-1. <span class="step-title">Check for SSH keys. <span>Have an existing kepair? You can skip to Step 4.</span></span>
-
- First, we need to check for existing ssh keys on your computer:
-
- <pre class="terminal bootcamp">
- <span class="codeline">$ cd ~/.ssh<span>Checks to see if there is a directory named ".ssh" in your user directory</span></span>
- </pre>
-
- If it says &ldquo;No such file or directory&ldquo; skip to __step 3__. Otherwise continue to __step 2__.
-
-2. <span class="step-title">Backup and remove existing SSH keys.</span>
-
- Since there is already an SSH directory you&rsquo;ll want to back the old one up and remove it:
-
- <pre class="terminal bootcamp">
- <span class="codeline">$ ls<span>Lists all the subdirectories in the current directory</span></span>
- <span class="bash-output">config id_rsa id_rsa.pub known_hosts</span>
- <span class="codeline">$ mkdir key_backup<span>makes a subdirectory called "key_backup" in the current directory</span></span>
- <span class="codeline">$ cp id_rsa* key_backup<span>Copies the contents of the id_rsa directory into key_backup directory</span></span>
- <span class="codeline">$ rm id_rsa*<span>Deletes the contents of the id_rsa directory</span></span>
- </pre>
-
-3. <span class="step-title">Generate a new SSH key.</span>
-
- To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
-
- <pre class="terminal bootcamp">
- <span class="codeline">$ ssh-keygen -t rsa -C "<em>user_name@username.com</em>"<span>Creates a new ssh key using the provided email</span></span>
- <span class="bash-output">Generating public/private rsa key pair.</span>
- <span class="bash-output">Enter file in which to save the key (/c/Users/<em>your_user_directory</em>/.ssh/id_rsa):</span>
- </pre>
-
- Now you need to enter a passphrase.
-
- <div class="more-info">
- <h4 class="compressed">Why do passphrases matter?</h4>
- <div class="more-content">
- <p>Passwords aren&rsquo;t very secure, you already know this. If you use one that&rsquo;s easy to remember, it&rsquo;s easier to guess or brute-force (try many options until one works). If you use one that&rsquo;s random it&rsquo;s hard to remember, and thus you&rsquo;re more inclined to write the password down. Both of these are Very Bad Things&trade;. This is why you&rsquo;re using ssh keys.</p>
-
- <p>But using a key without a passphrase is basically the same as writing down that random password in a file on your computer. Anyone who gains access to your drive has gained access to every system you use that key with. This is also a Very Bad Thing&trade;. The solution is obvious: add a passphrase.</p>
-
- <p><em>But I don&rsquo;t want to enter a long passphrase every time I use the key!</em></p>
-
- <p>Neither do we! Thankfully, there&rsquo;s a nifty little tool called <code>ssh-agent</code> that can save your passphrase securely so you don&rsquo;t have to re-enter it. Unfortunately, it takes a little work to get it up and running on Windows. For more information check out our <a href="/working-with-key-passphrases">help guide</a>.</p>
- </div>
- </div>
-
- <pre class="terminal bootcamp">
- <span class="bash-output">Enter passphrase (empty for no passphrase):</span>
- <span class="bash-output">Enter same passphrase again:</span>
- </pre>
-
- Which should give you something like this:
-
- <pre class="terminal bootcamp">
- <span class="bash-output">Your identification has been saved in /c/Users/<em>your_user_directory</em>/.ssh/id_rsa.</span>
- <span class="bash-output">Your public key has been saved in /c/Users/<em>your_user_directory</em>/.ssh/id_rsa.pub.</span>
- <span class="bash-output">The key fingerprint is:</span>
- <span class="bash-output">01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db <em>user_name@username.com</em></span>
- </pre>
-
-4. <span class="step-title">Add your SSH key to GitHub.</span>
-
- On the GitHub site _Click &ldquo;Account Settings&rdquo;_ &gt; _Click &ldquo;SSH Public Keys&rdquo;_ &gt; _Click &ldquo;Add another public key&rdquo;_
-
- Open the id_rsa.pub file with a text editor (Notepad will do just fine). This is your SSH key. __It&rsquo;s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ Now paste it into the &ldquo;Key&rdquo; field.
-
- <img src="/images/bootcamp/bootcamp_1_ssh.jpg" width="558" height="402" alt="Paste your SSH Key" />
-
- Hit &ldquo;Add Key.&rdquo;
-
-5. <span class="step-title">Test everything out.</span>
-
- To make sure everything is working you&rsquo;ll now SSH to GitHub. Don&rsquo;t change the &ldquo;git@github.com&rdquo; part. That&rsquo;s supposed to be there.
-
- <pre class="terminal bootcamp">
- <span class="codeline">$ ssh git@github.com<span>Attempts to ssh to github</span></span>
- </pre>
-
- Which should give you this:
-
- <pre class="terminal bootcamp">
- <span class="bash-output">The authenticity of host 'github.com (207.97.227.239)' can't be established.</span>
- <span class="bash-output">RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.</span>
- <span class="bash-output">Are you sure you want to continue connecting (yes/no)?</span>
- </pre>
-
- Don&rsquo;t worry, this is supposed to happen. Type &ldquo;yes&rdquo;.
-
- <pre class="terminal bootcamp">
- <span class="bash-output">PTY allocation request failed on channel 0</span>
- <span class="bash-output">Hi <em>username</em>! You've successfully authenticated, but GitHub does not provide shell access.</span>
- <span class="bash-output">Connection to github.com closed.</span>
-
- </pre>
-
- Don&rsquo;t worry, about the &ldquo;failed&rdquo; part. All you should care about is that you see &ldquo;You&rsquo;ve successfully authenticated&rdquo;
+{% include ssh_setup.markdown %}
##<span>Then: </span> Set Up Your Info
-Now that you have Git set up and your SSH keys entered into GitHub, it&rsquo;s time to configure your personal info.
+Now that you have Git set up and your SSH keys entered into GitHub, it&rsquo;s time to configure your personal info.
{% include email_setup.markdown %}
@@ -185,5 +89,5 @@ Congratulations, you now have Git and GitHub all set up! What do you want to do
<li><a href="/be-social/">Be Social</a></li>
</ol>
<script>
- $('#os').html("<b>" + $.client.os + "</b>");
+ $('#os').html("<b>" + $.client.os + "</b>");
</script> \ No newline at end of file