idea下载github慢?

353 阅读1分钟

我们使用工具访问github或者直接下载文件时,速度很快,但当我们想克隆github上的项目,克隆的速度确不尽如人意。原因是git克隆是并没有走代理的接口。

准备的工具:代理工具

第一步:查看代理软件的端口:不同软件代理端口不同。

第二步:打开git客户端设置代理

    http代理:

       git config --global http.github.com.proxy https://127.0.0.1:8080

       git config --global https.github.com.proxy https://127.0.0.1:8081

  socks5代理模式:

       git config --global http.github.com.proxy socks5://127.0.0.1:8080

       git config --global https.github.com.proxy socks5://127.0.0.1:8081

第三步:下载完毕之后,取消代理

      git config --global --unset http.proxy 

      git config --global --unset https.proxy