http://www.jianshu.com/p/645d3fe4e028

git克隆的工程太大用https的方式会有如下问题

hbl:tmp hubert$ git clone https://gitlab.spetechcular.com/aios/aios-for-robot.git
Cloning into 'aios-for-robot'...
error: RPC failed; result=22, HTTP code = 502
fatal: The remote end hung up unexpectedly

解决方法如下

  1. 通过--depth=1参数解决,拉取的只是master分支的shallow,只是最新的commit

    hbl:tmp hubert$ git clone --depth=1 https://gitlab.spetechcular.com/aios/aios-for-robot.git
    Cloning into 'aios-for-robot'...
    remote: Counting objects: 311, done.
    remote: Compressing objects: 100% (257/257), done.
    remote: Total 311 (delta 49), reused 158 (delta 33)
    Receiving objects: 100% (311/311), 35.17 MiB | 92.00 KiB/s, done.
    Resolving deltas: 100% (49/49), done.
    Checking connectivity... done.
  2. 对于在分支开发的开发者来说,不幸的是--depth=1不会把分支拉下来,于是要如下方式,拉取分支到本地

    hbl:aios-for-robot hubert$ git fetch origin lechange:lechange
    remote: Counting objects: 12, done.
    remote: Compressing objects: 100% (11/11), done.
    remote: Total 12 (delta 3), reused 0 (delta 0)
    Unpacking objects: 100% (12/12), done.
    From https://gitlab.spetechcular.com/aios/aios-for-robot
    * [new branch] lechange -> lechange
  3. 拉到本地的分支,并不是远程分支,需要设置upstream提交修改

    hbl:aios-for-robot hubert$ git push
    fatal: The current branch lechange has no upstream branch.
    To push the current branch and set the remote as upstream, use
    git push --set-upstream origin lechange
    hbl:aios-for-robot hubert$ git push --set-upstream origin lechange
    Counting objects: 2, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (2/2), 315 bytes | 0 bytes/s, done.
    Total 2 (delta 0), reused 0 (delta 0)
    To https://gitlab.spetechcular.com/aios/aios-for-robot.git
    02a4c0c..f4f5357 lechange -> lechange
    Branch lechange set up to track remote branch lechange from origin.
文/刘洪彬(简书作者)
原文链接:http://www.jianshu.com/p/645d3fe4e028
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

git clone error: RPC failed; result=22, HTTP code = 502的更多相关文章

  1. (转)git clone: error: RPC failed; result=18, HTTP code = 200 解决办法

    git clone: error: RPC failed; result=18, HTTP code = 200 解决办法 分类: git2013-09-01 17:03 10753人阅读 评论(2) ...

  2. 使用git error: RPC failed; result=22, HTTP code = 411

    使用git提交比较大的文件的时候可能会出现这个错误 error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung u ...

  3. git push报错:error: RPC failed; result=22, HTTP code = 413

    新项目推送到服务器时报错: error: RPC failed; result=22, HTTP code = 413| 7.66 MiB/s    fatal: The remote end hun ...

  4. git push throws error: RPC failed; result=22, HTTP code = 411的解决办法

    原因:默认 Git 设置 http post 的缓存为 1MB,将其设置为 500MB 解决办法如下: git config http.postBuffer 524288000

  5. Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly

    在用Git管理代码版本时,用git push命令提交代码,提示: 有以下几个可能性: Git 版本过低.GitCafe 推荐使用的 Git 版本是 >= 1.7. $ git --version ...

  6. git push error: RPC failed; result=56, HTTP code = 0 ,the remote end hung up unexpectedly

    git push的时候发生标题上面的错误,不知道怎么解决.搜索了下stackoverflow,上面说是http的postBuffer不够导致的. 要运行以下命令: git config --globa ...

  7. error: RPC failed; result=22, HTTP code = 411

    git config http.postBuffer 524288000orgit config --system http.postBuffer 524288000  

  8. git bash: error: RPC failed; result = 18, HTP code = 200B

    git config --global http.postBuffer 2428800 如果还是失败,说明buffer不够大,继续增加buff git config --global http.pos ...

  9. cocoaPods安装成功终端代码(期间报error: RPC failed; result=56, HTTP code = 200)

    Last login: Sat Oct 15 23:30:24 on ttys002 Sivek_lindeMacBook-Pro:~ Sivek_lin$ sudo gem update --sys ...

随机推荐

  1. excel 怎么修饰图表

    文中的图表只是方便以后记忆,故不详,具体细节没有截图保存,详细了解的,请自行百度

  2. 修正iOS从照相机和相册中获取的图片方向(转)

    - (UIImage *)fixOrientation { // No-op if the orientation is already correct if (self.imageOrientati ...

  3. eclipse上修改js后,浏览器上还是出现原来效果的解决方法

    废话不多说,直接上方法: 1.最简单的是清除浏览器缓存.2.换个浏览器试试.3.修改js文件名,换成别的名称,再引用.4.重启eclipse.5.重启电脑.

  4. JAVA程序操作hbase的Maven配置pom.xml文件

    由于工作需要,用到Java连接Hbase读写数据.原来的方式是直接将依赖的jar包全部下载下来,然后工程里面引用. 现想重构下,改为使用Maven管理,遇到了各种坑,各种不好使,特总结下. <d ...

  5. Mapreduce体系架构

    Mapreduce也采用master和slave的架构设计.Jobtracker负责作业的初始化和分配 与任务节点进行通信,协调整个作业的执行. 一个job分为两种task(map/reduce),包 ...

  6. 双十一 VS 火车票(12306)

    火车票开售了,又是一年,code了一年,咱们也该回顾回顾了. 还记得12306上线之初各种技术大牛给人家出方案,吐槽人家外包费用?我们来回顾回顾. 就园子里都过千篇文章来侃这事儿,请问有多少主题的文章 ...

  7. JSON数据解析

    1 JSON简介 JSON(JavaScript Object Notation),类似于XML,是一种轻量级的数据交换格式,比如在JavaEE中Struts2与Ajax在来回传递数据时,除了可以利用 ...

  8. django queryset values&values_list

    values返回是字典列表; values_list返回的是元组列表, values_list加上 flat=True 1 1 之后返回值列表

  9. solarium atomic update

    https://github.com/solariumphp/solarium/issues/159

  10. SQL知识整理二:锁、游标、索引

    锁 锁的模式 锁模式 描述 共享(S) 用于不更改或不更新数据(只读操作),如SELECT语句 更新(U) 用于可更新的资源中.防止当多个会话在读取.锁定以及随后可能进行的资源更新时发生常见形式的死锁 ...