How to temporarily disable git http proxy

后端 未结 3 984
北恋
北恋 2020-12-03 01:10

I am using git behind a corporate firewall, and I am successfully cloning external projects by using the http.proxy --global config.

My problem arises when I want to

3条回答
  •  误落风尘
    2020-12-03 02:05

    I always set:

    no_proxy=.mycompany
    

    (export if I am on Unix, or a simple set on Windows)

    It is enough to bypass the proxy for all intranet url ending with ".mycompany".

    See for an example:

    • "Can't update/install using composer behind a corporate firewall"
    • "Only use a proxy for certain git urls/domains?"
    • "Cannot do git-svn fetch behind proxy"

    I use it in my own project: .proxy.example:

    export http_proxy=http://username:userpassword@server.company:port
    export https_proxy=http://username:userpassword@server.company:port
    export no_proxy=.company localhost
    

提交回复
热议问题