Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to resolve server name or address error message #269

Open
imanuelcostigan opened this issue Jan 8, 2017 · 5 comments
Open

Failure to resolve server name or address error message #269

imanuelcostigan opened this issue Jan 8, 2017 · 5 comments

Comments

@imanuelcostigan
Copy link

I am trying to fetch a remote repository from behind a proxy with NTLM auth. I also have the HTTP_PROXY and HTTPS_PROXY environment variables set and have no problems cloning or perform other Git actions using the Github Desktop application or Github supplied bash shell. But I cannot perform these actions through git2r. The outcome does not change if I also set the .gitconfig file to include entries for http.proxy and https.proxy.

path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- git2r::init(path)
git2r::config(repo) # This reflects what I have in my gitconfig file 
git2r::remote_add(repo, "github", "https://github.com/imanuelcostigan/fmdates")
git2r::fetch(repo, "github")

#Error in git2r::fetch(repo, "github") : 
#  Error in 'git2r_remote_fetch': failed to send request: The server name or address could not be resolved
@imanuelcostigan
Copy link
Author

Here is my devtools::session_info()

Session info ------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.2 (2016-10-31)
 system   x86_64, mingw32             
 ui       RStudio (1.0.44)            
 language (EN)                        
 collate  English_Australia.1252      
 tz       Australia/Sydney            
 date     2017-01-08                  

Packages ----------------------------------------------------------------------------------------
 package  * version date       source        
 devtools * 1.12.0  2016-06-24 CRAN (R 3.3.1)
 digest     0.6.10  2016-08-02 CRAN (R 3.3.1)
 memoise    1.0.0   2016-01-29 CRAN (R 3.3.1)
 withr      1.0.2   2016-06-20 CRAN (R 3.3.1)

@imanuelcostigan
Copy link
Author

Is this related to #85 ?

@stewid
Copy link
Member

stewid commented Jan 25, 2017

No, it's not related to #85. It's not yet implemented in git2r, I think the git_proxy_options data structure must be configured in the call to git_remote_fetch for this to work.

@gse-cc-git
Copy link

Hello,
Is there a workaround ?
From what I understand I could have a similar problem with a git2r_push failing due to my institution's proxy (see #278)

@espinielli
Copy link

I have the same failure behind (corporate) proxy and success from home.
I have other R packages working and respecting HTTP_PROXY/HTTPS_PROXY settings from environment variables, but as @stewid wrote the issue is due to not having git_proxy_options being setup and passed to git_remote_fetch in the C call to libgit2.

Interfacing C to R is not in my skill set, otherwise I would really like to help.

I am surprised so few have (found and) commented this issue...it looks quite a general limitation/bug...

Anybody able to help?
How can I help more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants