-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
renv project fails to load when there is Remotes to private repository #1755
Comments
Thanks for the bug report -- I don't think you've missed anything here; |
A bit of follow up.
|
For context, is there a reason why you can't make the requisite authentication token available, so that |
With the current behaviour, with the above "rules", the setup will break at some point. |
Should be fixed via 5ea540a; please let me know if that seems to suffice for your use case. |
Thanks with this, I can start R and activate > renv::install("ggtext")
Error: failed to resolve remote 'github::myorg/myrepo:src/packages/mypackage@mypackage-v1.0.0' -- error downloading 'https://api.github.com/repos/myorg/myrepo/commits/mypackage-v1.0.0' [curl: (22) The requested URL returned error: 404]
Traceback (most recent calls last):
24: renv::install("ggtext")
23: records <- overlay(renv_project_remotes(project), remotes) at install.R#188
22: modifyList(as.list(lhs), as.list(rhs)) at utils.R#566
21: stopifnot(is.list(x), is.list(val))
20: modifyList(as.list(lhs), as.list(rhs)) at utils.R#566
19: records <- overlay(renv_project_remotes(project), remotes) at install.R#188
18: remotes <- renv_description_remotes(descpath) at project.R#112
17: resolved <- lapply(splat, renv_remotes_resolve) at description.R#193
16: FUN(X[[i]], ...)
15: withCallingHandlers(
renv_remotes_resolve_impl(spec, latest),
error = error
) at remotes.R#62
14: withCallingHandlers(
renv_remotes_resolve_impl(spec, latest),
error = error
) at remotes.R#62
13: resolved <- switch(
remote$type,
bioc = renv_remotes_resolve_bioc(remote),
bitbucket = renv_remotes_resolve_bitbucket(remote),
gitlab = renv_remotes_resolve_gitlab(remote),
github = renv_remotes_resolve_github(remote),
repository = renv_remotes_resolve_repository(remote, latest),
git = renv_remotes_resolve_git(remote),
url = renv_remotes_resolve_url(remote$url, quiet = TRUE),
stopf("unknown remote type '%s'", remote$type %||% "<NA>")
) at remotes.R#81
12: ref <- remote$ref %||% renv_remotes_resolve_github_ref(host, user, repo) at remotes.R#629
11: ref <- remote$ref %||% renv_remotes_resolve_github_ref(host, user, repo) at remotes.R#629
10: tryCatch(
renv_remotes_resolve_github_ref_impl(host, user, repo),
error = function(e) {
warning(e)
getOption("renv.github.default_branch", default = "master")
}
) at remotes.R#589
9: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: value[[3L]](cond)
6: warning(e) at remotes.R#592
5: withRestarts({
.Internal(.signalCondition(cond, message, call))
.Internal(.dfltWarn(message, call))
}, muffleWarning = function() NULL)
4: withOneRestart(expr, restarts[[1L]])
3: doWithOneRestart(return(expr), restart)
2: <condition-handler>(...)
1: stop(simpleError(message = message, call = e$call)) at remotes.R#57 |
I think so; let me take a look. |
I've made a change in b194034 that should help support this. The main requirement here is that you'll need to explicitly name the remote, by giving a prefix of
Can you give this a shot with the development version of |
Thank you, it does the trick! |
🎉 Thanks for your patience, and thanks for testing! |
I tried many options (https://rstudio.github.io/renv/reference/config.html), but none of them seems to matters at startup, such as
renv.config.install.remotes
orrenv.config.dependency.errors
.I have a
DESCRIPTION
file which includes a remote entry to a private GitHub repository.Token is not always defined before R starts and not even needed.
But this means
renv
cannot activate without the token which I can't understand the rational (if there is one) behind that behaviour.The following is the error tweaked a bit to hide sensitive information:
Did I miss something to avoid this error?
The text was updated successfully, but these errors were encountered: