一. 写的很好推荐,(http与ssh设置都有)
https://imciel.com/2016/06/28/git-proxy/
二. 只有 http的方式代码设置
http://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server