Skip to content

Instantly share code, notes, and snippets.

@StefanThoma
Last active March 30, 2023 06:34
Show Gist options
  • Save StefanThoma/7e42de104da022ec415041d08fc86007 to your computer and use it in GitHub Desktop.
Save StefanThoma/7e42de104da022ec415041d08fc86007 to your computer and use it in GitHub Desktop.
# Connect existing rstudio cloud environment to github using R
install.packages("usethis")
# Add authentication information: Use your GitHub user name and associated email address.
usethis::use_git_config(user.name = "StefanThoma",
user.email = "stefan.thoma@roche.com")
# Initiate git:
usethis::use_git()
# Create GH-Token:
usethis::create_github_token()
# This takes you to github. Choose settings, create GH-Token (store it in a password manager).
# Now use:
gitcreds::gitcreds_set()
# And enter the created GH-Token in the R console when prompted
# Create GitHub repo using:
usethis::use_github()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment