Solution. How to install_github when there is a proxy
26,169
Solution 1
SOLUTION
Step 1. Install devtools packages
if (!require("devtools")) install.packages("devtools")
library(devtools)
Step 2. Set configuration for our proxy (Please update your information proxy)
library(httr)
set_config(
use_proxy(url="18.91.12.23", port=8080, username="user",password="password")
)
install_github('rWBclimate', 'ropensci')
Solution 2
If setting proxy configuration does not work (as was the case for me), one can download the package from github to local machine:
Unzip the folder and install it from local machine:
devtools::install("C:/path/to/folder/ggbiplot-master")
Author by
Admin
Updated on December 07, 2020Comments
-
Admin over 3 years
When you try to install some package of R from GitHub's repository
install_github('rWBclimate', 'ropensci')
If you have the following error:
Installing github repo(s) rWBclimate/master from ropensci Downloading rWBclimate.zip from https://github.com/ropensci/rWBclimate/archive/master.zip Error in function (type, msg, asError = TRUE) : Could not resolve host: github.com; Host not found, try again
This error is displayed because R is trying to access on Intenet through a proxy.
-
dmvianna over 10 years
set_config
anduse_proxy
are part of thehttr
library, so one must runrequire(httr)
beforehand. -
Mullefa over 10 yearsthanks. I added
.First <- function() {set_config(use_proxy(...))}; .First()
, along with package dependencies, to.Rprofile
so that the proxy server is configured automatically on start-up. -
HattrickNZ about 9 yearsHow do I view what the proxy is currently set to?
-
airstrike over 6 yearsTo see what your proxy is currently set to, either
ping wpad
on the command prompt or openchrome://net-internals/#proxy
on Google Chrome. The latter is likely an URL to a .wpad file which you can download and read with any text editor. I had to set my username including my domain and auth to NTLM, so the full command was more like:use_proxy(url="X.X.X.X", port=8080, username="MYDOMAIN\\user", password="hunter2", auth="ntlm")
-
user1420372 over 6 yearsafter much trial and error I got this to work as follows: with_config(use_proxy(url="bcproxy.<DNS.Suffix>:8080", username="<MYDOMAIN\\user>", password=getPass(), auth="ntlm"), devtools::install_github('hadley/ggplot2')). This required the getPass package