diff options
| author | Cameron McEfee <cameron@github.com> | 2011-03-08 11:43:03 -0800 |
|---|---|---|
| committer | Cameron McEfee <cameron@github.com> | 2011-03-08 11:43:03 -0800 |
| commit | b7ba0072ffcde79da8fd2d0e9d16d93e68486255 (patch) | |
| tree | 383548336f9e8a1a85917e87f6c08ec522c472db /_posts/2009-06-13-win-set-up-git.markdown | |
| parent | 42334eea114845b8069f30ef386a49aed9dc4adc (diff) | |
Added ssh troubleshooting/condenced info into one file
Diffstat (limited to '_posts/2009-06-13-win-set-up-git.markdown')
| -rw-r--r-- | _posts/2009-06-13-win-set-up-git.markdown | 102 |
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 “No such file or directory“ 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’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’t very secure, you already know this. If you use one that’s easy to remember, it’s easier to guess or brute-force (try many options until one works). If you use one that’s random it’s hard to remember, and thus you’re more inclined to write the password down. Both of these are Very Bad Things™. This is why you’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™. The solution is obvious: add a passphrase.</p> - - <p><em>But I don’t want to enter a long passphrase every time I use the key!</em></p> - - <p>Neither do we! Thankfully, there’s a nifty little tool called <code>ssh-agent</code> that can save your passphrase securely so you don’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 “Account Settings”_ > _Click “SSH Public Keys”_ > _Click “Add another public key”_ - - Open the id_rsa.pub file with a text editor (Notepad will do just fine). This is your SSH key. __It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ Now paste it into the “Key” field. - - <img src="/images/bootcamp/bootcamp_1_ssh.jpg" width="558" height="402" alt="Paste your SSH Key" /> - - Hit “Add Key.” - -5. <span class="step-title">Test everything out.</span> - - To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part. That’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’t worry, this is supposed to happen. Type “yes”. - - <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’t worry, about the “failed” part. All you should care about is that you see “You’ve successfully authenticated” +{% 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’s time to configure your personal info. +Now that you have Git set up and your SSH keys entered into GitHub, it’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 |
