by Jacob Jenkins, Mac user.
This guide is for COP 3503 at the University of Florida.
First, get these installers:
msysGit provides a command line installation of Git, and includes some other crucial tools like gcc (The GNU C Compiler, found on the Ubuntu installations in the CISE lab computers) and make.
Double-click Git-1.9.0-preview20140217.exe and hit next all the way to Sunday.
The installer will probably open a killer .rtf file with release notes which you can ignore.
Press the Windows key and type "Git Bash" without quotes. A command line window should open.
In the newly opened window type ssh-keygen -t rsa -C "[email protected]"
replacing [email protected]
with your actual email, unless your email address is in fact [email protected]
which is totally cool by me.
Next you should see a message similiar to this one. Follow along with the bracketed [blahblahblah]
statements.
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press Enter]
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
Your identification has been saved in /c/Users/you/.ssh/id_rsa.
Your public key has been saved in /c/Users/you/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected]
Next type eval $(ssh-agent)
and then ssh-add ~/.ssh/id_rsa
.
Now we need to get that key we generated into Github.
First we need to copy that key we generated.
- Navigate to C:\Users\your_name.ssh\
- Right click id_rsa and click Open With...
- Select Notepad.
- Copy the contents of the file.
Next we need to add it to Github.
- Login to Github.
- Go to your Account Settings.
- Click SSH Keys in the left sidebar.
- Click Add SSH key
- Paste your key into the "Key" field
- Click Add key
- Confirm the action by entering your GitHub password
- Profit?!?!
You did it!
Unix pretty much kicks ass. Necessary Video.
msysGit comes jam packed with tons of Unix fun.
Example commands:
cd
changes directorycd ~/some_directory/
.ls
lists all files in your current directory.ls -a
lists all files in your current directory including those beginning with a period.gcc
compiles C programs.g++
compiles C++ programs.gdb
a killer command line debugger.git
allows you to use git on the command line.make
builds programs using the Makefile in a directory.