赞
踩
1.用git命令直接配置http.proxy代理
[CentOS7@user1 ~]$git config --global http.proxy http://user1:password@192.168.122.33:3128
[CentOS7@user1 ~]$git config --global https.proxy http://user1:password@192.168.122.33:3128
2.上述命令实际将代理服务器写入了此文件中
[CentOS7@user1 ~]$cat ~/.gitconfig
[http]
proxy = http://user1:password@192.168.122.33:3128
[https]
proxy = http://user1:password@192.168.122.33:3128
3.测试,代理可用
[CentOS7@user1 bundle]$ git clone --recursive 'https://github.com/fatih/vim-go.git' \
> '/home/user1/.vim/bundle/vim-go'
正克隆到 '/home/user1/.vim/bundle/vim-go'...
remote: Counting objects: 3446, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 3446 (delta 5), reused 0 (delta 0), pack-reused 3429
接收对象中: 100% (3446/3446), 670.13 KiB | 30.00 KiB/s, done.
处理 delta 中: 100% (1822/1822), done.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。