1

I'm behind a proxy and have to clone repositories from GitHub. Therefore my .gitconfig file contains

[http]
  proxy = http://my.proxy:8080
[https]
  proxy = http://my.proxy:8080

This works great.

But what can I do if I want to clone a repo from a host inside my LAN, when I must not use the Proxy? In other words, I am searching for an exception rule like

[http "myhost"]
  proxy = 

Sidenote: I would prefer a Git config solution (when it's possible), since I am working with multiple operating systems (Windows 7, Windows 8, Ubuntu, SuSE Linux) and the solution should work everywhere.

Desty
  • 2,684
  • 21
  • 28

1 Answers1

1

Starting git 1.8.5 (Oct. 2013), you can do the reverse:

  • specifying a proxy to be used for github.com only -not specifying a proxy for any other url.

See "Only use a proxy for certain git urls/domains?"

[http "http://github.com" ]
  proxy = http://my.proxy:8080
[https "https://github.com" ]
  proxy = http://my.proxy:8080
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • After updating to the newest Git version, this works like a charm. But I had to use the host "http://github.com", edited your answer accordingly. – Desty Jun 19 '14 at 13:56