@@ -4,10 +4,59 @@ title: Your first time with git and github
44---
55
66If you've never used git or github before, there are a bunch of things
7- that you need to do.
7+ that you need to do. It's
8+ [ very well explained on github] ( http://help.github.com/articles/set-up-git ) ,
9+ but repeated here for completeness.
810
9- - Get a github account
10- - Install git on your computer
11- - Set up git with your user name and email
12- - Set up ssh
13- - Paste your ssh public key into your github account settings
11+ - Get a [ github] ( http://github.com ) account.
12+ - Download and install [ git] ( http://git-scm.com/downloads ) .
13+ - Set up git with your user name and email.
14+
15+ - Open a terminal/shell and type:
16+
17+ ````
18+ $ git config --global user.name "Your name here"
19+ ````
20+
21+ ````
22+ $ git config --global user.email "your_email@example.com"
23+ ````
24+
25+ - Set up ssh on your computer. I like
26+ [Roger Peng](http://www.biostat.jhsph.edu/~rpeng)'s
27+ [guide to setting up password-less logins](http://www.biostat.jhsph.edu/bit/nopassword.html).
28+ Also see [github's guide to generating SSH keys](http://help.github.com/articles/generating-ssh-keys).
29+
30+ - Look to see if you have files `~/.ssh/id_rsa` and
31+ `~/.ssh/id_rsa.pub`.
32+ - If not, create such public/private keys: Open a terminal/shell and type:
33+
34+ ````
35+ $ ssh-keygen -t rsa -C "your_email@example.com"
36+ ````
37+
38+ - Copy your public key into your clipboard: In the terminal/shell, type:
39+
40+ ````
41+ $ pbcopy < ~ /.ssh/id_rsa.pub
42+ ````
43+
44+ - Paste your ssh public key into your github account settings.
45+
46+ - Go to your github [Account Settings](http://github.com/settings/profile)
47+ - Click “[SSH Keys](http://github.com/settings/ssh)” on the left.
48+ - Click “Add SSH Key” on the right.
49+ - Add a label (like “My laptop”) and paste the public
50+ key into the big text box.
51+ - In a terminal/shell, type the following to test it:
52+
53+ ````
54+ $ ssh -T git@github.com
55+ ````
56+
57+ - If it says something like the following, it worked:
58+
59+ ````
60+ Hi username! You've successfully authenticated, but Github does
61+ not provide shell access.
62+ ````
0 commit comments