git HTTP代理服务器配置

来源:互联网 发布:js 图片预览插件 编辑:程序博客网 时间:2024/06/06 05:41

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.
0 0
原创粉丝点击