* Register your CS61C class account and change your password

 

Your TA will give you a sheet of paper with your class login (cs61c-XX) and initial password.

 

Log into one of the machines in 330 Soda.

 

Add a shortcut to the Terminal program to the dock on the left hand side of the screen.

 

  * Click on "Dash home" (the icon at the top of the dock)

  * Type "Terminal" into the search field.

  * Drag the Terminal icon onto the Dock.

 

Now click on the Terminal icon in the dock - this should start a terminal session. (right click on the icon if you want to open multiple terminal windows)

 

Change your password by typing "ssh update" and following the on-screen prompts.

 

Once you've changed your password, type "register" and answer the series of questions

to associate your class account with your name and student ID number.

 

If you already have a GitHub account and/or SSH key pair, you can skip one or both of the following steps.

 

* Create a GitHub account                     

 

Start up Firefox by clicking on the icon in the dock on the left side of the screen.

 

Go to github.com, click on "Signup and Pricing."  On the next page, click on "Create a Free Account."

 

Fill in the required information (username, email address, password).

 

NOTE: Please donŐt use your CS61C class login as your github username.

 

* Create an SSH key pair     

 

Next, you need to create a public/private SSH key pair.

 

From the command line, type

 

  cd ~/.ssh

 

then, type (replacing you@example.com with your real email address):

 

  ssh-keygen -t rsa -C "you@example.com"

 

Press enter at the first prompt, and enter a passphrase when prompted to:

 

Generating public/private rsa key pair.

Enter file in which to save the key (/home/cc/cs61c/sp12/staff/cs61c-ta/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/cc/cs61c/sp12/staff/cs61c-ta/.ssh/id_rsa.

Your public key has been saved in /home/cc/cs61c/sp12/staff/cs61c-ta/.ssh/id_rsa.pub.

The key fingerprint is:

87:d2:b1:93:85:ee:b5:48:71:ba:08:c2:9c:97:5b:16 you@example.com

The key's randomart image is:

+--[ RSA 2048]----+

|                 |

|         .       |

|      E + o      |

| o . . + X       |

|  = + + S o      |

|   o = = * .     |

|    . . + .      |

|                 |

|                 |

+-----------------+

 

This creates two files (id_rsa = private key, id_rsa.pub = public key) in your .ssh directory.

 

* Register your SSH key pair with GitHub

 

Open up your id_rsa.pub file in a text editor - for example, to use gedit, type:

 

  gedit id_rsa.pub

 

Select and copy the text, it should look something like:

 

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIjSa6myw36lilGWjhvOQt26gd1Veh4vsio2OLdp+

0R3PbuHd89uWLiuz5xrYfUg6HLMIjZZY58BMVrZQiLzLCsB2o6O+REGiuJ48saJkKEdl/gSt2ht/TVEr

vRqlY1b2/eWn2fFJuepUQ6M8QUr+x5iHmb4L5d4QcKs+sSM2NG2MI4e+73VG97ns50cx9Y17PaY

lmGb+oM7BTQa1ZxG3585Huhb6SR8JgEr9+DfUSIBC2cTtwruBYG3RETKNvk90gCQ9o72CJ+HtOx1

5XyMc2ixdcGOJs+ubshvph01WlQiSxW6RKBvUDLaIqDl3H84jSvVgPRKgQqQFF4SZ3vLvZ you@example.com

 

Go back to the Firefox window (which should be open to github.com), and click on the

"Account Settings" icon (second from the right at the top of the screen)

 

Click on the "SSH Public Keys" option on the left side of the screen.

 

Click on "Add another public key"

 

Paste the text from your id_dsa.pub file into the "Key" field, and then click "Add key."

 

To verify that your key is working, go back to the Terminal window and type the following:

 

  ssh -T git@github.com                     

 

and answer "yes" when prompted.  This should result in the following:

 

The authenticity of host 'github.com (207.97.227.239)' can't be established.

RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.

Enter passphrase for key '/home/cc/cs61c/sp12/staff/cs61c-ta/.ssh/id_rsa':

Hi funkrhythm! You've successfully authenticated, but GitHub does not provide shell access.

 

Where your GitHub username should appear in place of "funkrhythm"

 

* Make an initial commit into your git repository

 

Tell your lab TA your GitHub username along with your class login (cs61c-XX).  They will

create a private repository for you on GitHub, within the ucberkeley-cs61c organization.

 

Once your TA has created a repository for you, go back to your terminal window and type:

 

  git config --global user.name "Your Name"

  git config --global user.email you@example.com

 

replacing "Your Name" and "you@example.com" with your real name and email address.

 

Finally, you need to make an initial commit into your new git repository. 

 

Execute the following series of commands, replacing "cs61c-ta" with your class login:

 

  cd ~

  mkdir Git

  cd Git

  mkdir cs61c-ta

  cd cs61c-ta

This should only be run ONCE. Doing git init twice will cause hard to fix 'git in git' situations.

  git init

  touch README

  git add README

  git commit -m 'first commit'

  git remote add origin git@github.com:ucberkeley-cs61c/cs61c-ta.git

  git push -u origin master

 

That's it!  You have now configured your own private git repository, hosted by GitHub.

 

For more information about how to use Git and GitHub, check out the documentation at help.github.com