Git代理问题error: Couldn't resolve proxy 'to' while...

原创
2013/03/20 00:00
阅读数 1.8K

最近想学习一下Go语言。在虚拟机下的Ubuntu1210下使用go get下载github上的package的时候会调用git clone去下载github上的代码,因为我是代理的环境(外网NTLM代理,本机使用ntlmaps架了ntlm转http的代理),所以要设置代理:

<p> ``` git config --global http.proxy to http://127.0.0.1:5865 ``` <p> 一般在windows上用Git Bash就可以使用http协议连接了。可是在ubuntu里总是报错<code>error: Couldn't resolve proxy 'to' while accessing</code>,我记得已经不是第一次遇到这个问题了,在网上搜了一下,也有差不多的问题,不过都是没有代理的情况,直接把```~/.gitconfig```中的代理删掉就可以。如果用代理的话,我想改一下.gitconfig的内容应该也可以。 <p> <pre> [http] proxy = to [https] proxy = to [http "proxy"] to = http://127.0.0.1:5865 [https "proxy"] to = http://127.0.0.1:5865 </pre> <p> 如果我只有一个代理,为什么还要靠中间变量命名呢?直接改掉! <p> <pre> [http] proxy = http://127.0.0.1:5865 [https] proxy = http://127.0.0.1:5865 </pre> <p> 不知道是bug还是我的错觉- -!<p>记一下,省得以后再折腾它。

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部