install.packages("usethis")
Part 1: in RStudio console
1. install usethis
Do this in the console!
2. Generate a personal access token using usethis
Again, do this in the console!
::create_github_token() usethis
This will lead you to a web browser.
Part 2. In the GitHub webpage
1. (if prompted) in the web browser, enter your GitHub password
2. Fill in the info about your new personal access token
3. Scroll to the bottom of the page, hit Generate token
4. Copy the personal access token to your clipboard
Part 3. In the RStudio console
1. Set the personal access token.
Run this in the console!
::gitcreds_set() gitcreds
2. Paste your personal access token when prompted
Paste your PERSONAL ACCESS TOKEN. NOT YOUR GITHUB PASSWORD. NOT YOUR COMPUTER PASSWORD.
PASTE YOUR PERSONAL ACCESS TOKEN.
3. Double check that the personal access token is stored
Again, run this in the console:
::git_sitrep() usethis
4. Look for Personal access token
under GitHub
This should say <discovered>
.
5. Look at Name and Email under Git global (user)
- Name should be your GitHub username
- Email should be your GitHub account email