You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法克隆Bitbucket仓库,遇RPC失败及curl 18错误求解决方案

解决Bitbucket克隆时RPC失败(curl 18)的方案
  • 换用SSH协议克隆
    HTTPS协议常因传输限制触发这类错误,改用SSH克隆更稳定。先确认已在Bitbucket配置好SSH公钥,再执行命令:
    git clone git@bitbucket.org:用户名/仓库名.git

  • 分段克隆后拉取完整历史
    一次性浅克隆失败的话,分步加深历史深度再拉全量:

    git clone --depth 10 git@bitbucket.org:用户名/仓库名.git
    cd 仓库名
    git fetch --depth 50
    git fetch --unshallow
    

    逐步拉取小批量数据,降低传输中断概率。

  • 排查网络环境
    传输中断大多和网络不稳定有关:

    • 切换网络(比如WiFi换有线、换运营商网络)
    • 检查代理/防火墙是否拦截Git传输,有代理的话确保Git配置正确:
      git config --global http.proxy http://代理地址:端口
      无需代理就取消配置:
      git config --global --unset http.proxy
  • 调整Git HTTP超时与低速阈值
    除了缓冲区,延长超时时间并关闭低速限制:

    git config --global http.postBuffer 524288000
    git config --global http.lowSpeedLimit 0
    git config --global http.lowSpeedTime 999999
    

    避免因临时网速慢被判定为传输失败。

  • 清理Git缓存后重试
    重置缓冲区配置并清理无用缓存:

    git config --global --unset-all http.postBuffer
    git gc --prune=now
    

    完成后再重新尝试克隆。

内容的提问来源于stack exchange,提问作者Rohit W

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 13:50:24