RStudio, it's me, you know me!

Annoyed that RStudio asks for your username and password every time you want to push to your GitHub repo?

  1. Go to the shell (project path).
  2. Set username and email:
    git config --global user.name 'your_username'
    git config --global user.email 'your_email@example.com'
    
  3. Create SSH key:
    ssh-keygen -t rsa -C 'your_email@example.com'
    
  4. In RStudio, go to menu Tools / Global options / Git SVN / View public key and copy the key to your Github account setting (Edit profile / SSH keys / Add SSH key).
  5. Check that ssh-authentication works:
    ssh -T git@github.com
    
  6. Change remote.origin.url from HTTPS to HTTP:
    git config remote.origin.url git@github.com:your_username/your_project.git
    
Lennart Oelschläger
Lennart Oelschläger
Research Associate, PhD Student