使用git proxy排除主机或域名 [英] Exclude hosts or domains with git proxy

查看:419
本文介绍了使用git proxy排除主机或域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在防火墙后面使用git,我需要配置

I use git behind a firewall and I need to configure

$ git config --global http.proxy

来处理连接。

但是如果我只想避免代理本地域名?
我需要每个主机的代理服务器,除了局域网内的服务器。

But what happens if I only wanna avoid proxy for local domains? I need the proxy for every host excepts for servers in my LAN.

有一种方法可以做到吗?

There is a way to do?

Thanks

Thanks

推荐答案

您可以定义一个环境变量no_proxy以避免特定域的代理: / p>

You can define an environment variable no_proxy in order to avoid the proxy for a specific domain:

no_proxy=.mycompany

另一种方法,自git 1.8.5+开始,将为每个网址设置一个代理

这篇关于使用git proxy排除主机或域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆