Skip to content
R for the Rest of Us Logo

Using Git and GitHub with R

Connect RStudio and GitHub

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

  1. Create a GitHub account

  2. Create a GitHub personal access token (PAT) using the create_github_token() function from the usethis package

  3. Register your PAT using the gitcreds_set() function from the gitcreds package

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Juan Clavijo

Juan Clavijo • October 21, 2021

If I set the token to expire in 7 days, will I need to do this process again in 7 days?

Michael Bedan

Michael Bedan • March 12, 2023

Do I use the same PAT on multiple computers? I have two laptops I use regularly when I am using R and I want to access the same projects.

Alberto Cabrera

Alberto Cabrera • July 2, 2024

A year ago, I relied on SSH to link RSudio to GitHub. I've got a long SSH key as well as an identifyFile ~/.ssh/id_ed255519. I also had to set up an SSH password. Do I need to reset this option using PAT instead?

Sorry for asking dumb questions. But navigating this Git process has been daunting for me.

David Keyes

David Keyes Founder • July 2, 2024

No need to do anything with the SSH key you created previously. You can just use the PAT moving forward.