当项目过大时,git clone时会出现error: RPC failed; HTTP  curl  The requested URL returned error:  Gateway Time-out的问题

解决方法很简单,在git clone时加上--depth=1即可解决

克隆的项目只包含最近的一次commit的一个分支,体积很小,即可解决文章开头提到的项目过大导致Timeout的问题,但会产生另外一个问题,他只会把默认分支clone下来,其他远程分支并不在本地,所以这种情况下,需要用如下方法拉取其他分支:

$ git clone --depth  https://github.com/dogescript/xxxxxxx.git
$ git remote set-branches origin 'remote_branch_name'
$ git fetch --depth origin remote_branch_name
$ git checkout remote_branch_name

git clone时加上--depth 1的更多相关文章

  1. git clone时出现 error:inflate:data stream error(incorrect data check)

    git clone时出现 error:inflate:data stream error(incorrect data check) fatal:serrious inflate inconsiste ...

  2. idea在使用git clone 时出现Filename too long

    idea在使用git clone 时出现Filename too long的报错信息,使用如下命令就可以解决该问题:在 git bash命令模式下,运行命令 git config --global c ...

  3. git clone 时注意点

    环境: 在公司访问外网需要设置代理,另外,在公司局域网内架设了一台 GIT 服务器. 在使用 git clone 时,不能设置成 git 使用代理: git config --global http. ...

  4. Git clone时出现fatal:the remote end hung up unexpectedly

    以HTTPS方式进行git clone时出现如下错误: 方法1:增大缓存 git config http.postBuffer 524288000 尝试无效: 方法2:配置git的最低速度和最低速度时 ...

  5. git clone时RPC failed; curl 18 transfer closed with outstanding read data remaining

    git clone时报RPC failed; curl 18 transfer closed with outstanding read data remaining 错误 原因1:缓存区溢出 解决方 ...

  6. git clone时,报403错误,完美解决方案

    首先命令行操作结果如下: root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git ...

  7. 使用windows 命令行执行Git clone时出现Host key error

    由于是在java中执行cmd命令调用git clone,导致git读取不到用户的ssh key,需要设置环境变量Home为正确的用户路径: cmd /c set HOME=C:/Users/你的用户名 ...

  8. git clone时,提示warning: remote HEAD refers to nonexistent ref, unable to checkout

    一.环境 发行版:Ubuntu 18.04.1 LTS 代号:bionic 内核版本:4.15.0-30-generic 二.背景 git clone https://source.codeauror ...

  9. Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决。

    看了好多资料终于搞定了git 中clone命令报错这个问题,废话不多说直接上步骤希望对大家有帮助. 1   删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git ...

随机推荐

  1. 能ping通Linux但是ssh连不上问题解决方法

    问题:能ping通Linux服务器 但是ssh连不上  <Linux redhat AS4 版本> 解决方法这个问题花了我20分钟去查资料,网上写的解决方法也是五花八门,不过,总算解决了, ...

  2. 7月新的开始 - Axure学习03 - 布尔运算、表单元件

    布尔运算 布尔运算:是一种数字符号化的逻辑推演法.包含联合.相交.相减等 在图形处理中,通过联合.相交.相减等操作使基本的图形组合产生新的形体 操作 准备 蓝色(底部).绿色(顶部) 合并:两个图形合 ...

  3. glog的安装使用

    参考 :https://blog.csdn.net/Pig_Pig_Bang/article/details/81632962 https://blog.csdn.net/cywtd/article/ ...

  4. [Angular 8] Implement a Custom Preloading Strategy with Angular

    Preloading all modules is quite an extreme approach and might not always be desirable. For instance, ...

  5. iptables 相关命令

    1. 清除已有iptables规则 iptables -F iptables -X iptables -Z 2. 开放指定的端口(添加规则) iptables -A INPUT -s 127.0.0. ...

  6. SPOJ 2939 QTREE5 LCT

    维护信息的方式十分巧妙~ 维护每一棵 splay 中深度最浅,深度最深的点距离最近的白点. 这样非常方便维护,进行区间合并,进行子树维护 很多时候在维护东西的时候最大/最小/深度最小/深度最大会相对容 ...

  7. Linux下基于Xampp的TestLink的安装部署

    由于项目需要,故需要搭建Testlink,且出于稳定,考虑在linux环境部署,当然windows系统也是可以的. 系统:64位操作系统 linux:centos6.8 testlink:1.9.14 ...

  8. Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2)

    A - Forgetting Things 题意:给 \(a,b\) 两个数字的开头数字(1~9),求使得等式 \(a=b-1\) 成立的一组 \(a,b\) ,无解输出-1. 题解:很显然只有 \( ...

  9. linux下安装apache和php和mysql

    我的系统环境时ubuntu 18.04.3,为了ROS: 首先:安装下面一堆软件包: sudo apt install nginx nginx-doc fcgiwrap sudo apt instal ...

  10. Fluent 时间步长【转载】

    转载自:http://blog.sina.com.cn/s/blog_4ada3be301011rjp.html 用FLUENT计算非稳态问题,是不是在计算时必须保证在每个时间步timestep里都要 ...