Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 error when installing from GitHub #295

Closed
wibeasley opened this issue Feb 2, 2020 · 1 comment
Closed

401 error when installing from GitHub #295

wibeasley opened this issue Feb 2, 2020 · 1 comment
Assignees

Comments

@wibeasley
Copy link
Member

wibeasley commented Feb 2, 2020

In #293, @Stephonomon wrote:


I tried installing (from GitHub) but received an error message.

> remotes::install_github(repo="OuhscBbmc/REDCapR", ref="dev")
Error: Failed to install 'REDCapR' from GitHub:
  HTTP error 401.
  Bad credentials

  Rate limit remaining: 59/60
  Rate limit reset at: 2020-02-02 05:16:23 UTC
@wibeasley wibeasley self-assigned this Feb 2, 2020
@wibeasley
Copy link
Member Author

@Stephonomon, this sounds like it's related to GitHub, and not specifically to REDCapR. So the existing posted solutions should address this.

My favorite is by Jenny Bryan & Jim Hester: https://happygitwithr.com/github-pat.html#step-by-step

And here's one adapted from the issues of the 'remotes' package that is very similar (r-lib/remotes#330 (comment)). I'd still use usethis::git_sitrep() (as described in the book above) to verify the PAT is set.

  1. Login to GitHub.com
  2. Create a new personal access token (Settings > Developer settings > Personal access tokens)
  3. Copy the token to your clipboard
  4. In RStudio, run usethis::edit_r_environ()
  5. Store the token in R, save, and restart R.
    GITHUB_PAT=xxxx
  6. Run remotes::install_github("OuhscBbmc/REDCapR") or remotes::install_github(repo="OuhscBbmc/REDCapR", ref="dev")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant