R/git_through_proxy.r

Defines functions git_through_proxy

Documented in git_through_proxy

#' Connect git to github.com through proxy
#'
#'
#' @return Allows git bash to talk to github.com. Only needs to be run once.
#' @examples
#' git_through_proxy()
#' 
#' @export
#' @import getPass
#' @importFrom stringr str_split
#' @importFrom curl ie_get_proxy_for_url


git_through_proxy<-function(){
proxy_ip <-
  stringr::str_split(curl::ie_get_proxy_for_url("https://github.com/"), ";")[[1]][1]


system(paste0("git config --global http.proxy ",proxy_ip))


}
lina2497/demeter_proxy documentation built on April 26, 2020, 11:42 a.m.