Tag Archives: OSX

Add Existing SSH Key To OSX

26 May 2016

Here are the steps to setup your Mac to work with your Git repo with the same key that you’ve been using on your other development machines.

Copy your id_rsa file into your “.ssh” folder which is a child of your home folder. This folder is hidden but can be easily revealed via this terminal command:

$ open ~/.ssh

Now that your .ssh folder is open in the finder you can easily drag/drop/copy your pre-existing id_rsa file into it.

Next, check to see if the SSH agent is running:

$ ps -e | grep ssh-agent
20207 ?? 0:00.53 /usr/bin/ssh-agent -l // its running

If it is not running:

$ ssh-agent /bin/bash

Check to see what identities have been loaded:

$ ssh-add -l

Now load your identity with this command:

$ ssh-add ~/.ssh/id_rsa

Finally, check again for the list of identities – there should be one more than before (or just one if there weren’t any previously).

$ ssh-add -l
2048 SHA256:41ZyLeEcsdfwefsdfLegsdftQdm0Ew /Users/my_mac/.ssh/id_rsa (RSA)

Error Installing NPM Package

09 Apr 2014

I was setting up a Mac today for PhoneGap development and I ran into this error message while attempting to install Ripple:

  • npm ERR! Please try running this command again as root/Administrator

npm_install_err_01

The solution is to change ownership of everything in /usr/local to the current user via the terminal:

  • sudo chown -R $USER /usr/local

You’ll be asked for your password after which the relevant files will be changed. As can be seen in the following image I succesfully executed the command and thereafter didnt have any issues installing Ripple.

npm_install_err_02