Executive summary:
devtools::install_git
with GitLab through a proxy throws an Installation failed: Error in 'git2r_clone': failed to send request: A connection with the server could not be established
error.
Custom package (R default example):
To test my GitLab and GitHub workflow I have created a few repositories:
Git bash:
After setting up my company proxy settings in the .gitconfig file I am able to access them all over the https from the git bash console with e.g. the git fetch github_public master
, where github_public
is simply https://github.com/m-dz/md.test_public.git
, etc.
R:
After setting up proxy (needed to use the devtools::install_github
) with:
httr::set_config(
httr::use_proxy(
url = 'proxy_url',
port = proxy_port,
username = 'username',
password = 'password'
)
)
and updating both devtools
and git2r
to the development versions (just to be sure) with devtools::install_github
I am able to use:
devtools::install_git('https://github.com/m-dz/md.test_public.git', quiet = FALSE)
to install the public repo from GitHub (but devtools::install_github('m-dz/md.test_public')
is not always working, do not know why, seems to be a random behaviour...).
Unfortunately GitLab do not want to cooperate with me as:
devtools::install_git('https://gitlab.com/m-dz/md.test_public.git', quiet = FALSE)
throws and error mentioned in the summary, i.e.
Installation failed: Error in 'git2r_clone': failed to send request: A connection with the server could not be established.
Of course the private GitLab repo with either https://user:pass@...
or credentials = git2r::cred_user_pass(...)
behaves identically...
Question:
What can I do to debug this and hopefully be able to use GitLab from R (free private repos...).