当项目过大时,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. AJAX学习笔记——跨域

    跨域 一个域名地址的组成 http:// www abc.com : 8080 / scripts/jquery.js 协议 子域名 主域名 端口号 请求资源地址 端口号:一般来说域名端口号是80,如 ...

  2. 【xsy2978】Product of Roots 生成函数+多项式ln+多项式exp

    题目大意:给你两个多项式$f(x)$和$g(x)$,满足$f(x)=\prod\limits_{i=1}^{n}(a_i+1)$,$g(x)=\prod\limits_{i=1}^{m}(b_i+1) ...

  3. pycharm鼠标更改字体大小

    Pycharm快捷键设置(鼠标滚动控制字体大小) 一.pycharm字体放大的设置 File -> setting -> Keymap ->在搜寻框中输入:increase -> ...

  4. ModelAndView返回Json格式的数据

    第一种方式: 1.自定义类JacksonUtil.java,类中实现tojson方法(即将数据转成json类型): 2.自定义类JsonView 继承 AbstractView 3.xml中配置bea ...

  5. [Dart] splitMapJoin

    var str3 = '''Multi Line String'''; print( str3.splitMapJoin( RegExp(r'^', multiLine: true), // Matc ...

  6. Codeforces Round #555 (Div. 3) C1,C2【补题】

    D1:思路:L,R指针移动,每次选最小的即可. #include<bits/stdc++.h> using namespace std; #define int long long #de ...

  7. 071_关闭 SELinux

    #!/bin/bashsed -i '/^SELINUX/s/=.*/=disabled/' /etc/selinux/configsetenforce 0

  8. spring-AMQP-RabbitMQ

    1.spring整合rabbitMQ配置文件   rabbitmq-context.xml <beans xmlns="http://www.springframework.org/s ...

  9. oracle的jdbc.properties文件配置

    ----------Oracle #do Oracle JDBC jdbc.driverClassName=oracle.jdbc.driver.OracleDriverjdbc.url=jdbc:o ...

  10. 百度UEditor编辑器从word粘贴公式

    官网地址http://ueditor.baidu.com Git 地址 https://github.com/fex-team/ueditor 参考博客地址 http://blog.ncmem.com ...