git bash:错误:RPC失败; 结果= 18,HTP代码= 200B | 1KiB /秒

Inn*_*net 17 git clone

当我尝试在git bash上克隆时,我收到此错误:

$git clone <link>
Cloning into 'name_project'...
Password for '<link>':
remote: Counting objects: 100% (659/659), done.
error: RPC failed; result=18, HTTP code = 200B | 1 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: recursion detected in die handler
Run Code Online (Sandbox Code Playgroud)

这是使用的命令:

git clone h(double t)ps://account@bitbucket.org/path.git
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

Rav*_*dra 24

失败并出现错误的解决方案:RPC失败; result = 18,HTTP代码= 200

第一解决方案

如果错误是致命的,请尝试在远程存储库中运行以下命令:index-pack failed

git repack -a -f -d --window = 250 --depth = 250

二解决方案:

如果以上方法不起作用,还可以从远程存储库位置尝试以下方法:

git gc - aggressive

git repack -a -f -d --window = 250 --depth = 250

第三解决方案

尝试减少远程存储库配置中的postBuffer大小.请按照以下步骤操作

  1. 转到远程git存储库目录
  2. 运行以下命令以减小postBuffer的大小

    git config http.postBuffer 24288000

  3. 你可以通过"git config --get http.postBuffer"检查这个值
  4. 尝试立即克隆存储库(回到你克隆的地方)
  5. 如果失败并出现错误:RPC失败; 结果= 18,HTTP代码= 200再次尝试通过在配置中进一步增加postBuffer.转到第1步.


Sri*_*vas 13

嘿,我有同样的问题,但从下面提到的链接解决

https://confluence.atlassian.com/pages/viewpage.action?pageId=301663284

编辑:

**来自网站:**

解决方法:

虽然我们为此选项设置了适当的服务器站点设置,但您可能需要调整/覆盖客户端的设置.为此,请执行以下命令:

来自特定的存储库.请注意,末尾的数字是您希望在单个帖子中允许的大小(以字节为单位).如果您有更大的文件,则可能需要增加此数字.

git config http.postBuffer 524288000

为您连接的所有远程Git存储库设置全局

git config --global http.postBuffer 524288000

我不太确定它对每个人都有效,但这解决了我的问题


Ale*_*lex 7

我试了一下,无法解决当前的解决方案.它解决了我刚访问我的GitLab独角兽日志时显示的问题:

I, [2014-02-10T17:46:29.953026 #5799]  INFO -- : worker=0 ready
E, [2014-02-10T17:47:52.026874 #5719] ERROR -- : worker=1 PID:5728 timeout (181s > 180s), killing
E, [2014-02-10T17:47:52.039670 #5719] ERROR -- : reaped #<Process::Status: pid 5728 SIGKILL (signal 9)> worker=1
Run Code Online (Sandbox Code Playgroud)

工作者超时说明了长时间运行git clone的问题.

它修复了GitLab Unicorn配置..只需在config/unicorn.rb中将180秒更改为更大

timeout 360
Run Code Online (Sandbox Code Playgroud)

如果您使用其他Web服务器或使用代理Nginx,您可能还需要:

  server {
       ...
    # if a file, which is not found in the root folder is requested,
    # then the proxy pass the request to the upsteam (gitlab unicorn)
    location @gitlab {
      proxy_read_timeout 600; # https://github.com/gitlabhq/gitlabhq/issues/694
      proxy_connect_timeout 600; # https://github.com/gitlabhq/gitlabhq/issues/694
      proxy_redirect     off;

      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_set_header   Host              $http_host;
      proxy_set_header   X-Real-IP         $remote_addr;

      proxy_pass http://gitlab;
    }
  }
Run Code Online (Sandbox Code Playgroud)

注意部分proxy_read_timeout和proxy_connect_timeout.

  • 在我的情况下,unicorn.rb中的超时为30秒.它看起来像愚蠢的消息:#unke worker 30秒后而不是60秒(默认值).克隆存储库是一个问题,因为30秒对于大型存储库来说还不够.我把它改为300,现在工作正常. (2认同)