当前位置:   article > 正文

git HTTP代理服务器配置_git http.proxy

git http.proxy

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
  • 1
  • 2

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
  • 1
  • 2
  • 3
  • 4
  • 5

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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/482608
推荐阅读
相关标签
  

闽ICP备14008679号