This function is run automatically to allow gistillery to access your GitHub account. It is adapted from gistr::gist_auth
Arguments
- app
An [httr::oauth_app()] for GitHub. The default uses an application `gistr_oauth` created by Scott Chamberlain.
- reauth
(logical) Force re-authorization?
Details
There are two ways to authorise gistillery to work with your GitHub account:
- Generate a personal access token with the gist scope selected, and set it as the `GITHUB_PAT` environment variable per session using `Sys.setenv` or across sessions by adding it to your `.Renviron` file or similar. See https://help.github.com/articles/creating-an-access-token-for-command-line-use for help - Interactively login into your GitHub account and authorise with OAuth.
Using `GITHUB_PAT` is recommended but it should also work with `gitcreds::gitcreds_get()` if you're storing your credentials there.