Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
download package on windows behind proxy does not work (easily) #45
Trying to solve this issue with
However, I encountered an issue as I am on windows and behind a proxy. Trying to install a github package throws an error
remotes::install_github("hadley/lubridate") #> Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : #> cannot download all files
and even crash R session if proxy is not configured correctly.
This issue is clearly proxy-related.
below is what I have done to make it work. See at the end for Suggestions
About proxy configuration
Proxy configuration is not the easy thing but I managed to deal with it most of the time. Configuring R to Use an HTTP or HTTPS Proxy by RStudio support team helps.
However, the easiest way on windows is to rely on
At first, default behavior threw an error. With some efforts I manage to make it work by configuring proxy differently.
At the end, I found how to deal with the issue. However, I think it could be useful to clarify all this about proxy configuration
What do you think of all this ? I willing to help if you interested as I planned to write something about all this configuration.
This is great, thanks much for investigating! I will have more time to look at it later, for now three quick comments:
Thanks for the encouragement !
Oh, I don't think there is one. We would probably need a (slightly?) different solution for each platform
Yes, and I think this is because
From the help file of 'download' function in
If we look a the function, in kind of pseudo code it behaves as followed
So wininet seems compatible with https from R 3.2 and Windows platform is tested before libcurl availability. It seems a good solution.
Regarding proxy configuration, with this solution Windows platform methods seems to use IE system settings and not environnement variables. However it relies on
Thanks! I don't mind making
As for proxy environment variables, we are simply using
I'll be happy to work on a PR.
Do you think we need to apply the same algorithm only for https url as it is done in
I thinks that's because HTTPS was an the main issue in downloader, not proxies. Nowadays HTTPS tends to be OK by default.…
On Sat, Nov 26, 2016 at 10:23 AM, Christophe Dervieux < ***@***.***> wrote: OK I will work on something for all urls. In fact, I asked because I was wondering why downloader selects method only for https letting base download.file handles the rest. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#45 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAoTQL6MbrhWWs1W2szHr3gCE9X0Qf7aks5rCAiFgaJpZM4K8XWQ> .
I decided to dig into R methods for
I compiled my research and understanding this gist
"wget" & "curl" can be used in specific cases if available on the system and with specific extra command for "curl". Not sure we have to deal with this choice. We could offer to the users the ability to provides download method manually if needed.
So, depending on what R version
Based on that, I will try to make a first version of a PR.