【发布时间】:2015-02-10 08:57:07
【问题描述】:
在工作中我有代理,在家里我没有代理
在工作中,我将代理设置为:
git config - -global http.proxy http://proxy.theaddress.co.uk:8080
git config - -global https.proxy https://proxy.theaddress.co.uk:8080
在家里我删除了类似的代理
git config --global --unset http.proxy
git config --global --unset https.proxy
我正在尝试将一些东西推送到我的 git 存储库
git push -u origin master
我得到了
Could not resolve proxy: proxy.theaddress.co.uk
.gitconfig 文件如下所示。
[user]
name = first last
email = first.last@sitname.co.uk
[http]
[https]
[push]
default = current
[http]
[core]
excludesfile = /Users/first.last/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[http]
[https]
[http]
[https]
[http]
[https]
[http]
[https]
[http]
[https]
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[http]
[https]
[https]
[http]
[http]
[https]
[http]
如何删除代理?
【问题讨论】:
-
您是否将其定义为环境变量 HTTP_PROXY?还是在 repo (.git/config) 的本地配置中?
-
我没有看到代理条目。你试过 git config --global --unset http.proxy 吗?应该有一个 [http] proxy = entry 但它不存在
-
VonC - 我认为我没有将它定义为环境变量,我将如何/在哪里检查。 unixmiah - 是的,我试过 git config --global --unset http.proxy,这是我的问题。我知道没有代理条目,这就是我感到困惑的原因。