红联Linux门户
Linux帮助

git HTTP代理服务器配置

发布时间:2015-11-03 15:55:59来源:linux网站作者:xinlongabc

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.


Linux下配置Squid代理服务器:http://www.linuxdiyf.com/linux/12366.html

Linux入门教程:Squid代理服务器:http://www.linuxdiyf.com/linux/10528.html

RHEL6.4搭建Squid代理服务器:http://www.linuxdiyf.com/linux/10655.html

10个关于Linux中Squid代理服务器的实用面试问答:http://www.linuxdiyf.com/linux/10443.html

CentOS 6.4下Squid代理服务器的安装与配置:http://www.linuxdiyf.com/linux/7048.html