#rstudio #github missing command lines for mac setup @rstudio @github @swcarpentry

Every few months, I try to do a clean install on my machine. I know that OS X Sierra is due out in September, but I elected to do a wipe and clean install now for the remainder of summer.


Wipe, reinstall OSX from usb, brief minor hack/tweaks, then just a few apps including base-r and rstudio. I prefer to connect to github without desktop app and use rstudio directly.

Limitation, I forgot two little things that consumed forever to get rstudio and github to connect. So, if you are a mac user too, here is a synopsis.


Most steps well articulated online
#open terminal/shell.
git config –global user.name “your_username”
git config –global user.email “your_email@example.com”

#missing 1 for macs: tell osx keychain to store password
git config –global credential.helper osxkeychain

#generate SSH RSA key via command line
ssh-keygen -t rsa -C “your_email@example.com”

#alternatively, you can do via rstudio tools/global options/enable version control
#then create RSA key, save, copy, and paste over to your github account online.

#check authentication works
ssh -T git@github.com

#missing 2 for macsdo a command line push to get password into osxkeychain
#I tried clone/new repo, make changes, commit, then push, and failed because no password to push changes via version control to github was stored and rstudio does not talk to keychain #frustrating
#so make/clone a repo, generate a change, and then do push from command line

git push -u origin gh-pages


git push -u origin master

#depending on branch name

#I hope this note-to-self provides you with the missing lines you need to get your next level too!