-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
BLUF:
Could we improve the error message for installing dependencies to:
- note when the 404 error comes from a dependency, not the main repo
- suggest the user switches to the
Sys.setenv("GITHUB_PAT" = ###)
method for multiple private installs - potentially pass the auth_token down to the private dependency repo call
Imagine your installing a package using remotes::install_github("foo", auth_token = "###")
, and you get this error message:
Downloading GitHub repo foo
Error: HTTP error 404.
Not Found
Rate limit remaining: 50/60
Rate limit reset at: 2019-02-14 15:39:37 UTC
You might spend a bit of time confused if:
- the
foo
repo is not private - foo is private, but you supplied a valid auth token.
If foo
has dependency bar
, then it's actually bar
which is 404'ing.
If a repo/package has a dependency which is a private repo, and you supply a github token as an argument to the install_github(auth_token)
, the auth_token
is not passed to installing the dependencies. Traceback below.
Traceback()
traceback()
16: stop(github_error(res))
15: github_commit(username = remote$username, repo = remote$repo,
host = remote$host, ref = remote$ref, pat = remote$auth_token %||%
github_pat(), use_curl = use_curl)
14: remote_sha.github_remote(x)
13: remote_sha(x)
12: FUN(X[[i]], ...)
11: vapply(remote, function(x) remote_sha(x), character(1))
10: package_deps(deps, repos = repos, type = type)
9: nrow(cran_deps)
8: combine_deps(package_deps(deps, repos = repos, type = type),
remote_deps(pkg, ...))
7: dev_package_deps(pkgdir, repos = repos, dependencies = dependencies,
type = type, ...)
6: install_deps(pkgdir, dependencies = dependencies, quiet = quiet,
build = build, build_opts = build_opts, upgrade = upgrade,
repos = repos, type = type, ...)
5: install(source, dependencies = dependencies, upgrade = upgrade,
force = force, quiet = quiet, build = build, build_opts = build_opts,
repos = repos, type = type, ...)
4: FUN(X[[i]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
2: install_remotes(remotes, auth_token = auth_token, host = host,
dependencies = dependencies, upgrade = upgrade, force = force,
quiet = quiet, build = build, build_opts = build_opts, repos = repos,
type = type, ...)
1: remotes::install_github("foo", auth_token = token2, force = TRUE)
infotroph