Skip to content

Using pak to install dataedu package throws a GitHub related error #619

@restrellado

Description

@restrellado

Noting this one so it stays in the backlog. It's probably because I need to update GitHub credentials. Keeping it here in case others experience the same thing.

How to reproduce:

Update RStudio to 2025.05.1+513

Update R to 4.5.1 (2025-06-13) -- "Great Square Root"

Note: I discovered all my packages were no longer installed

Install {tidyverse} package

Run this code from from ch 5:

# Install {pak}
install.packages("pak")
# Install the {dataedu} package (requires R version 3.6 or higher)
pak::pak("data-edu/dataedu")
Error: 
! error in pak subprocess
Caused by error: 
! Could not solve package dependencies:
* data-edu/dataedu: ! pkgdepends resolution error for data-edu/dataedu.
Caused by error: 
! Bad GitHub credentials, make sure that your GitHub token is valid.
Caused by error in `stop(http_error(resp))`:
! Unauthorized (HTTP 401).
---
Backtrace:
1. pak::pak("data-edu/dataedu")
2. pak::pkg_install(pkg, ...)
3. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), …
4. err$throw(res$error)
---
Subprocess backtrace:
1. base::withCallingHandlers(cli_message = function(msg) { …
2. get("pkg_install_make_plan", asNamespace("pak"))(...)
3. prop$stop_for_solution_error()
4. private$plan$stop_for_solve_error()
5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
6. base::throw(new_error("Could not solve package dependencies:\n", msg, …
7. | base::signalCondition(cond)
8. global (function (e) …

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions