• 首页

  • 归档
D a r r e n 的 小 窝
D a r r e n 的 小 窝

Darren

获取中...

03
26
Git

利用代理解决github下载速度国慢

发表于 2020-03-26 • 被 407 人看爆

  由于众所周知的原因,在国内使用github时的时候网络就像蜗牛速度一样,虽然国内也有码云可以使用,但是很多优秀开源项目基本都在github上,所以总要想点解决办法,虽然网上有推荐修改host文件来提高速度,但是我发现好像并没什么鸟用,不过还好git提供了使用代理方式,所以特此记录下.
  点击查看Git学习教程

代理设置

# 走http和https代理
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
# 走socks5代理,两者取其一
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080

# 修改用户目录下的.gitconfig配置文件
[https]
	proxy = socks5://127.0.0.1:1080
[http]
	proxy = socks5://127.0.0.1:1080

取消代理设置

git config --global --unset http.proxy
git config --global --unset https.proxy

查看代理设置

git config --global --get http.proxy
git config --global --get https.proxy
分享到:
Linux C/C++一些常见的标准文件以及定义
Linux上根据对应sig文件校验文件的完整性
  • 文章目录
  • 站点概览
Darren

帅哥Darren

Github QQ Email RSS
看爆 Top5
  • CentOS 7 C++开发环境搭建(03) 1,384次看爆
  • 解决/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./vcpkg) 1,009次看爆
  • CentOS 7 C++开发环境搭建(02) 994次看爆
  • Linux上根据对应sig文件校验文件的完整性 782次看爆
  • Git使用笔记 648次看爆

Copyright © 2022 Darren · 蜀ICP备19032015号

Proudly published with Halo · Theme by fyang · 站点地图