2013-10-31 68 views
2

我在Intranet上使用Git。因此,要訪問Intranet的存儲庫,我不需要代理。要訪問遠程子模塊,我需要通過代理。Git - 如何設置gitproxy,使用內部網的代理服務器,並使用其他代理服務器

我無法使用gitconfig全局_proxy設置(_proxy = my.proxy.address)。如果我全局設置代理,則無法訪問Intranet。

我目前的做法是使用[core]下的gitproxy條目。

gitproxy = none for my.intranet.address 
gitproxy = my.proxy.address 

但這並不奏效。現在我已經沒有想法了。

o我在做什麼錯?
o有沒有更簡單的方法?

榮譽提前。 \ O/\ O/

回答

1

您必須設置代理服務器對每個遠程基礎

[remote "origin"] 
url = http://intranet.mycompany.com/git/my-git-repo 
proxy = 

從我的頭頂,這可以用下面的命令

git config origin.proxy "" 
完成