Skip to content

Instantly share code, notes, and snippets.

@damianesteban
Created March 27, 2015 04:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damianesteban/34d8bb0fccead67ec4ea to your computer and use it in GitHub Desktop.
Save damianesteban/34d8bb0fccead67ec4ea to your computer and use it in GitHub Desktop.
osx-dev-guide-part-2

Part 2

Making sure all is cool with Homebrew

First off, issue the following command:

brew doctor

That is a way for Homebrew to make sure that it is properly installed on your system.

In order to update/upgrade Homebrew (which you should do every day or so), you issue the following command:

brew update && brew upgrade

Configure Git

1.) Type in the following at your command line:

git config --global color.ui true

That just makes git use color.

2.) Then type:

git config --global user.name "YOUR NAME"

so in your case:

git config --global user.name "Kenny Batista"

3.) Then type in:

git config --global user.email "YOUR@EMAIL.com"

Same deal as above, maybe yours would be:

git config --global user.email "kenny@kenny.com"

4.) Next:

ssh-keygen -t rsa -C "YOUR@EMAIL.com"

So again, maybe yours would be:

ssh-keygen -t rsa -C "kenny@kenny.com"

Just keep hitting enter, don't change any of the settings. When it asks you for a passphrase, I recommend keeping it blank.

5.) Next, make sure ssh-agent is running:

eval "$(ssh-agent -s)"

6.) Add your key to the agent:

ssh-add ~/.ssh/id_rsa

Adding your key to GitHub

7.) First, issue the following command at the command prompt:

pbcopy < ~/.ssh/id_rsa.pub

pbcopy is a nifty little command that copies the contents of a file to your clipboard.

8.) Go to GitHub, your account, settings, then click SSH Keys

Click Add SSH-Key

In the title field, give your computer a name, i.e. kenny-macbook (or whatever you want)

9.) In the "Key Field", hit Command-V to paste your key into the field.

Click on Add Key. GitHub will ask you for your password, enter it.

Test the connection

10.) In your terminal issue the following command:

ssh -T git@github.com

You should see something like:

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)?```

Type in:

    yes

Then you should get a message like:

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


**You are all set.**

*If you have any problems let me know.*
@kennylugo
Copy link

Thanks Damian! I completed both guides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment