Skip to content

use github in proxy

kuang edited this page May 13, 2015 · 1 revision

在代理环境下使用github

背景

  • win7
  • proxy
  • 假设你的用户名就是 p2227 ,密码是 mima

使用代理

网上流传的方法是 git config --global http.proxy http://username:password@host.com

但我发现设置到fiddler 再,git config --global http.proxy http://127.0.0.1:8888才是work的

可以顺便 git config --global https.proxy http://127.0.0.1:8888

git协议的代理未找到,似乎要用工具去转协议

免每次输入用户密码

在与 .gitconfig文件同文件夹中,建立.git-credentials文件,可使用copy con 命令

copy con .git-credentials
https://p2227:mima@github.com

按F6,回车

git config --global credential.helper store

重新开cmd窗口

加密保存的密码

http://segmentfault.com/q/1010000002582224