Skip to content

Instantly share code, notes, and snippets.

@GuillaumePressiat
Last active April 20, 2020 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuillaumePressiat/1dcd74728bb7284e0693849cb17393ce to your computer and use it in GitHub Desktop.
Save GuillaumePressiat/1dcd74728bb7284e0693849cb17393ce to your computer and use it in GitHub Desktop.
install_github_with_proxy <- function(package = "GuillaumePressiat/pmeasyr", proxy_port = "<host>:<port>/", ...){
u <- rstudioapi::askForPassword('User for proxy authentification')
p <- rstudioapi::askForPassword('Password for proxy authentification')
Sys.setenv(ALL_PROXY = paste0("http://", u, ":", p, "@", proxy_port))
remotes::install_github(package, ...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment