get_git_auth: Handle GitHub PAT authorization

View source: R/get_git_auth.R

get_git_authR Documentation

Handle GitHub PAT authorization

Description

Handle things whether or not a GitHub PAT is supplied.

Usage

get_git_auth(
  git_pat = NULL,
  git_username = "PersonalAccessToken",
  quiet = FALSE
)

Arguments

git_pat

If private repositories are to be retrieved, a github personal access token needs to be supplied. If none is supplied, then this will attempt to grab from a git pat set in the environment with usethis::create_github_token().

git_username

Optional, can include username for credentials.

quiet

Use TRUE if you don't want the warning about no GitHub credentials.

Value

Authorization argument to supply to curl OR a blank string if no authorization is found or supplied.


githubr documentation built on Oct. 20, 2023, 5:09 p.m.