When using remotes::install_deps() there is no way I can see to have different auth_tokens for dependencies from GitHub versus a hosted GitHub Enterprise server. This causes install() to fail if both types of dependencies are present because the auth_token will be valid for one type and not the other.
Possible Solution
Pass the dependency's RemoteHost to gitcreds_get() to resolve to the correct PAT for each type of dependency:
|
pat <- tryCatch( |
|
gitcreds_get()$password, |
|
error = function(e) "" |
|
) |