Skip to content
R for the Rest of Us Logo

Connect RStudio and GitHub

This lesson is locked

Get access to all lessons in this course.

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?

David Keyes

David Keyes

October 21, 2021

Yes, that's right. For my own PAT, I set it never to expire so I don't have reenter it.

Mike Bedan

Mike 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.

David Keyes

David Keyes

March 13, 2023

You could use the same PAT on two computers. You could also just create a new PAT for each computer. As long as you have a PAT saved on each computer that allows it to authenticate with GitHub, you should be fine.