Installation fails on Mac?
Hi!, I was trying to install a private repo from pak (0.8.0.1), which works in linux.
The error, seems something of the credentials are failing:
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).
Here the info:
R version 4.2.3 (2023-03-15)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS 15.2
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] processx_3.8.4 compiler_4.2.3 R6_2.5.1
[4] cli_3.6.3 tools_4.2.3 rstudioapi_0.16.0
[7] callr_3.7.6 ps_1.8.1 pak_0.8.0.1
The project has also private dependencies.
Here the weird things:
In Linux it works.
In Mac:
- Remotes fails
- Pak fails
- Devtools works! (clone and install locally, which also needs to clone the internal deps which works, so is able to get the private repo)
- Git Clone works from the terminal
Thx!
This seems like an issue specific to your setup, so it would be pretty hard for us to fix without a reproducible example.
Sadly I'm out of ideas in which can be the causes or how to make a reprex that works for you, any ideas? we can test things and post the results here.
Try to debug remotes (easier to debug than pak) to see what token it sends to GitHub and why it is invalid.