最近想学习一下Go语言。在虚拟机下的Ubuntu1210下使用go get下载github上的package的时候会调用git clone去下载github上的代码,由于我是代理的环境(外网NTLM代理,本机使用ntlmaps架了ntlm转http的代理),因此要设置代理:git
<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>记一下,免得之后再折腾它。github