-1

I'am trying to clone buildroot repository by utilising the following command:

> git clone https://github.com/buildroot/buildroot.git
Cloning into 'buildroot'...
fatal: unable to access 'https://github.com/buildroot/buildroot.git/': Could not resolve host: github.com

Could you please help me undrestand what's wrong with this command ?

EDIT

The result of nslookup github.com is:

> nslookup github.com
;; Got SERVFAIL reply from 192.168.249.10, trying next server
;; connection timed out; no servers could be reached
Mouin
  • 1,025
  • 4
  • 19
  • 33
  • 1
    The command is fine, it seems your network setup has issues. Git can't resolve the domain `github.com`. – sebasgo Jan 03 '17 at 09:06
  • @sebasgo thank u , i can access the link with the browser, "network setup" you mean there is firewalls or sth else , how can i check ? – Mouin Jan 03 '17 at 09:10
  • 1
    are u able to clone some other repositories – Deepak Mahakale Jan 03 '17 at 09:16
  • http://stackoverflow.com/questions/16298986/unable-to-connect-to-github-com-for-cloning?rq=1 – Quy Tang Jan 03 '17 at 09:21
  • It seems there is something wrong with your DNS resolution. The browser might have the name-resolution cached and thus still open the URL while Git cannot. Can you do `nslookup github.com`? – Vampire Jan 03 '17 at 09:28
  • @Deepak Mahakale , no i'am not able to clone other repo – Mouin Jan 03 '17 at 09:58
  • 2
    Possible duplicate of [could not resolve host github.com error while cloning remote repository in git](http://stackoverflow.com/questions/20370294/could-not-resolve-host-github-com-error-while-cloning-remote-repository-in-git) – Deepak Mahakale Jan 03 '17 at 10:14
  • @Mouin as Deepak said, do you work somewhere where you have to use an HTTP proxy, then configure it. If not, talk to your IT to get this issue resolved. It is an infrastructure problem like sebasgo said. – Vampire Jan 03 '17 at 10:58
  • @Vampire, thank you , the problem is resolved i configure HTTPS_PROXY environement variable to be the same as the browser proxy config and it works as expected. – Mouin Jan 03 '17 at 11:04

1 Answers1

0

The problem is resolved.

What i have done : On firefox browser

  preferences
     advanced:network:settings

There is proxy settings of the browser HTTP Proxy=my_proxy and Port=my_port.

I configure HTTPS_PROXY as follow:

export HTTPS_PROXY=my_proxy:my_port

And the cloning works as expected.

I go on this solution because the link can be opened with a browser and not with the command line, so surely there is a missing confguration in shell env variable.

similar question(pointed by @Deepak Mahakale) : could not resolve host github.com error while cloning remote repository in git

Community
  • 1
  • 1
Mouin
  • 1,025
  • 4
  • 19
  • 33