Skip to content

remotes::install_deps() fails when dependencies include both GitHub and GitHub Enterprise packages #833

@ezraporter

Description

@ezraporter

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:

remotes/R/github.R

Lines 91 to 94 in bcd35d5

pat <- tryCatch(
gitcreds_get()$password,
error = function(e) ""
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions