Can access Github via browser but not via git commands

I work in a bank which seems to be blocking Github (they use svn with internally hosted repos):

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

However, I'm able to access https://github.com/torvalds/linux through the web browser.

How did the company manage to block https://github.com/torvalds/linux.git but not https://github.com/torvalds/linux?

Is there any way I can get around it? I tried git init and manually adding the remote url, but git pull still gives the same error as above.


Presuming you're doing this on windows, or have access to a windows machine to check the proxy settings, linux users you're on your own! ;)

Command to use:

git config --global http.proxy http://proxyuser:[email protected]:8080
  • change proxyuser to your proxy user
  • change proxypwd to your proxy password
  • change proxy.server.com to the URL of your proxy server
  • change 8080 to the proxy port configured on your proxy server

If your proxy doesn't require logging in, use

git config --global http.proxy http://proxy.server.com:8080

How do you find your proxy details? Well it varies depending how the proxy is setup, but you may find it in the system settings.

First, windows key + x,

  • Click Settings,
  • Click Network & Internet,
  • Click Proxy....