gge-ucd / Discussion

Class discussion for R-DAVIS course
0 stars 4 forks source link

problems with SSH... #4

Closed ryanpeek closed 7 years ago

ryanpeek commented 7 years ago

@gge-ucd/ewoks Hi y'all, I just solved a weird problem (as a result of upgrading to the newest Mac OSX Sierra)...if you aren't using that platform disregard this.

If you are having trouble cloning a repo in RStudio using the workflow we followed in class (getting "ssh-key not found, or no public key found" sort of errors), this may solve your problem, it did for me.

This does require using a little command line programming in your Terminal, so please ask for help if you need it.

Basically this assumes you have already set up your SSH key, you've successfully added it to Github, and you've been able to check that you have said key on your computer (in a Terminal window, type ls ~/.ssh* and you should see the id_pub file pair).

This is based on a small blog post I found here.

Essentially all you need to do is as follows:

  1. Open a new window in your Terminal. Type cd ~/.ssh/
  2. Type ls -a to list all the files...you should see your SSH paired files, as well as a file called "config".
  3. Open your config file (or if you don't have one, use a text editor to create a file called "config" with no ".txt" or ".md" appended to it...just "config"). You can open it using a program most macs have called "nano" by using the following command: nano config
  4. If you have text in your config, delete it and add the following exactly as is:
Host *
  UseKeychain yes
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_rsa
  1. Save and close the file (if using nano, just hit Ctrl + X, it will ask if you want to save, hit Y, it will then ask if you want to use the same file name: config, just hit enter).
  2. Close your computer down and restart.

It should work now! At least it did for me.