Git proxy bypass

前端 未结 7 2048
借酒劲吻你
借酒劲吻你 2020-12-07 14:07

Git works in a proxied environment by setting the http.proxy configuration parameter.

For certain addresses I need to bypass the proxy. Is there a no-proxy/bypass-p

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 14:20

    Assuming you are starting by cloning, the origin-config things are not so useful. When I find myself in that position I do.

    $> no_proxy=$no_proxy, git clone ...
    

    Note that this will be per command. To make this permanent for the repo just cloned, you can now go to the newly cloned repo and add the empty-proxy setting.

    $> git config --add remote.origin.proxy ""
    

    However, if you want this host or IP excluded from proxy in all cases, use your shells init-file to do the inclusion of your origins permanent for your user.

    I would put the following line last in .bashrc

    export no_proxy=$no_proxy,
    

    I hope that makes things clearer!

提交回复
热议问题