Solution. How to install_github when there is a proxy

RGithubProxy

R Problem Overview


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.

R Solutions


Solution 1 - R

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 - R

If setting proxy configuration does not work (as was the case for me), one can download the package from github to local machine:

enter image description here

Unzip the folder and install it from local machine:

devtools::install("C:/path/to/folder/ggbiplot-master")

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGuillermo SantosView Question on Stackoverflow
Solution 1 - RGuillermo SantosView Answer on Stackoverflow
Solution 2 - RUSER_1View Answer on Stackoverflow