zoukankan      html  css  js  c++  java
  • git clone 很慢

    git clone 依然很慢徘徊在20kb/s,

    如果你有代理通过https协议下载,不要用 ssh协议下载

    1、配置git全局代理,注意你的端口号是不是1080,打开浏览器查看代理里面可以看到代理到ip和端口号

    git config --global http.proxy http://127.0.0.1:7891
    git config --global https.proxy https://127.0.0.1:7891
    
    

    2、通过 git config --global -l查看是否配置成功
    我的配置如下

    http.proxy=socks5://127.0.0.1:7891
    https.proxy=socks5://127.0.0.1:7891
    

    3、如何下载
    记住通过 https下载,

    git clone --depth=1 https://www.github/xxx/xxxx.git
    

    如果项目很大历史很多,记住 加 个 depth=1 参数,
    git clone 是 https 因为这个时候走的是http的代理。

    Cloning into 'xxxxx'...
    remote: Enumerating objects: 1902, done.
    remote: Counting objects: 100% (1902/1902), done.
    remote: Compressing objects: 100% (1614/1614), done.
    remote: Total 1902 (delta 287), reused 1305 (delta 270), pack-reused 0
    Receiving objects: 100% (1902/1902), 50.30 MiB | 5.93 MiB/s, done.
    Resolving deltas: 100% (287/287), done.
    Checking out files: 100% (1835/1835), done.
    

    看到上面结果没?5.93 MiB/s
    美滋滋。

  • 相关阅读:
    ThreadPoolExecutor源码解析
    AQS框架
    (转)rvm安装与常用命令
    (转).gitignore详解
    (转)可简化iOS 应用程序开发的6个Xcode小技巧
    (转)webView清除缓存
    (转)git常见错误
    iOS本地通知
    (转)iOS获取设备型号
    (转)iOS平台UDID方案比较
  • 原文地址:https://www.cnblogs.com/tonyY/p/12176388.html
Copyright © 2011-2022 走看看