Git http.proxy设置 [英] Git http.proxy Setting
问题描述
我试图弄清楚这个git的东西,有一次我弄乱了http.proxy变量。现在这只是无稽之谈,'asdf'所以推动不起作用。我不知道以前的代理设置是什么(我甚至不知道代理服务器是什么)。任何将http.proxy设置为正确值的方法?
I was trying to figure this git thing out and at one moment I messed with the http.proxy variable. Right now it's just nonsense, 'asdf' so pushing doesn't work. I don't know what the proxy setting was before (I don't even know what proxy server is). Any way to set http.proxy to the correct value?
现在错误是:在访问...时无法解析代理'asdf'致命:HTTP请求失败。
Right now the error is: "Couldn't resolve proxy 'asdf' while accessing ... fatal: HTTP request failed.
推荐答案
你错误地添加了一个条目到你的git配置文件中,你可以操纵global和per-使用 git config
。
You added an entry to your git config file by mistake. You can manipulate the both the global and per-repository config files using git config
.
来存储配置文件。查找是否将代理项添加到全局或本地配置文件从控制台运行它:
To find out if you added the proxy entry to the global or local config files run this from the console:
git config -l --global | grep http # this will print the line if it is in the global file
git config -l | grep http # this will print the line if it is in the repo config file
然后从全局文件或本地文件中删除所有 http.proxy
条目运行:
Then to remove all the http.proxy
entries from either the global or the local file run this:
git config --global --unset-all http.proxy # to remove it from the global config
git config --unset-all http.proxy # to remove it from the local repo config file
我希望这有助于。
这篇关于Git http.proxy设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!