-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg_install() doesn't respect download options #119
Comments
A note on the workaround: it wouldn't work very well if some dependencies also need to be pulled from the private repo, that would result in a lot of manual dependency-chasing, which I suspect wouldn't cooperate very well with |
I don't think using |
Any update here? I still can't seem to use |
Is there any movement on this? It's a blocker for me being able to use |
I am still hoping for this, please provide an update if possible. |
I am not sure if pak is mangling the password out of the URL, I would think not. Does download.file("https://user:[email protected]/myrepository/src/contrib/PACKAGES", tempfile()) Does this work? curl::curl_download("https://user:[email protected]/myrepository/src/contrib/PACKAGES", tempfile()) |
Hi Gabor, thanks for the response. We're not putting the username & password directly in the URL, you can see the details in my original question. We're using The reason we strongly prefer this is that it keeps the credentials from appearing in log files, etc. |
Hello from 4 years in the future. =) I am still very interested in getting |
@kenahoo the good news is that I've heard this request from more folks, so I think we are likely to provide some tooling for passing usernames and passwords to CRAN-like repos. (Probably not via a netrc file but hopefully something almost as convenient) |
At my organization, we have a local CRAN-alike that requires authentication for access. Using the core R tools, I can set the following options to let
curl
handle the authentication:The benefit of doing things this way is that the username & password stay out of the text of the URL, so they don't appear in log files, etc.
With
pak::pkg_install()
though, the standarddownload.file
mechanism doesn't seem to be used, and I don't see another way to pass credentials for download:There are actually 2 issues here:
options('repos')
options('repos')
-mboost
is a normal CRAN package, it wouldn't have been found at the first URL anyway.A current workaround would be to use
download.file
and then install from the tarball directly. Could support for these options be added, either by leveragingdownload.file
(preferred) or aping its behavior?(This ticket is similar to r-lib/remotes#290 where I used to have the same issue with
remotes::install_url()
.)The text was updated successfully, but these errors were encountered: