Git 配置代理
2016-06-20 by dongnan
错误描述
golang 编译程序,go get 提示IO超时,go get 命令底层调用 git 完成代码下载,超时原因是GFW你懂得。
cd go-dsp-api/ go get
package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context" 
(https fetch: Get https://golang.org/x/net/context?go-get=1: dial tcp 216.58.221.113:443: i/o timeout)
解决方法
为 git 配置 http代理,完成远程go get下载任务。
git config --global http.proxy http://54.169.33.199:8083 
git config --global https.proxy https://54.169.33.199:8083 
# 注意,此 http代理不稳定。
默认不设置代理
git config --global --unset http.proxy git config --global --unset https.proxy
查看已经设置的值
git config http.proxy