
Set up GitHub access for private repositories
ms_setup_github.RdInteractive setup wizard that configures authentication for reading CSV files from private GitHub repositories. This function:
Details
Checks that git is installed and available
Guides creation of a GitHub Personal Access Token (PAT) with
reposcope if one is not already storedStores the PAT securely via
gitcredsfor future useVerifies that authentication works by testing access to a repository
Run this function once before using read_github_csv() to access private
repositories. The stored PAT will be used automatically for subsequent
requests.
A Personal Access Token (PAT) is a GitHub credential that allows API access.
The repo scope is required to read from private repositories. Tokens are
stored locally by the gitcreds package in your system's credential manager.
If your organization uses Single Sign-On (SSO), you may need to authorize your PAT for that organization at https://github.com/settings/tokens after creating it.
See also
read_github_csv() for reading CSV files from GitHub,
github_raw_url() for building raw GitHub URLs.
Examples
if (FALSE) { # \dontrun{
# Basic setup (verifies against default test repository)
ms_setup_github()
# Verify access to a specific private repository
ms_setup_github(repo = "your-org/your-private-repo")
# After setup, you can read CSVs from private repos
data <- read_github_csv("path/to/file.csv", repo = "your-org/your-repo")
} # }