错误:git-upload-pack 死于信号 13 [英] error: git-upload-pack died of signal 13

查看:19
本文介绍了错误:git-upload-pack 死于信号 13的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Mac OS X 10.9.2 中有一个 GitLab 服务器 (6.7.2),带有 git 1.9.2.有两个存储库.一个可以成功克隆,但另一个失败

I have a GitLab server (6.7.2) in Mac OS X 10.9.2, with git 1.9.2. There are two repositories. One can be cloned successfully, but the other fails as

$ git clone http://*/gamil/gamil.git
Cloning into 'gamil'...
remote: Counting objects: 426, done.
remote: Compressing objects: 100% (375/375), done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

我在 GitLab 中检查了 unicorn.stderr.log 并发现

And I checked unicorn.stderr.log in GitLab and found

I, [2014-04-21T23:03:58.761225 #4929]  INFO -- : master process ready
I, [2014-04-21T23:03:58.764556 #4940]  INFO -- : worker=0 ready
I, [2014-04-21T23:03:58.766098 #4941]  INFO -- : worker=1 ready
error: git-upload-pack died of signal 13

这个错误是怎么来的?如何解决?提前致谢!

What does this error come from? How to fix it? Thanks in advance!

编辑 1:

我检查了存储库:

$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (426/426), done.

所以看起来一切都很好,但无法克隆到本地计算机.

So it seems everything is fine, but can't clone into local computer.

编辑 2:

我已将 GitLab 更新到 6.8,但没有运气.

I have updated GitLab to 6.8 with no luck.

编辑 3:

我可以通过 ssh 协议克隆有问题的仓库作为

I can clone the problematic repository through ssh protocol` as

$ git clone dongli@<...>:gamil
Cloning into 'gamil'...
remote: Counting objects: 426, done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 426 (delta 89), reused 426 (delta 89)
Receiving objects: 100% (426/426), 821.19 KiB | 0 bytes/s, done.
Resolving deltas: 100% (89/89), done.
Checking connectivity... done.

编辑 4:

我在 unicorn.rb 中检查了超时:

I checked the timeout in unicorn.rb:

# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 300

以及nginx的配置:

# 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 300; # Some requests take more than 30 seconds.
  proxy_connect_timeout 300; # Some requests take more than 30 seconds.
  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_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;

  proxy_pass http://gitlab;
}

编辑 5

我已经把仓库上传到了GitHub,克隆就OK了:

I have uploaded the repository to GitHub, and the clone is OK:

$ git clone https://github.com/dongli/GAMIL.git 1
Cloning into '1'...
remote: Counting objects: 355, done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 355 (delta 35), reused 355 (delta 35)
Receiving objects: 100% (355/355), 809.75 KiB | 244.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
Checking connectivity... done.

所以存储库是好的.

推荐答案

我终于通过查看 /var/log/nginx/gitlab_error.log 里面的抱怨找到了我的问题的原因

I finally found the reason for my problem by looking inside /var/log/nginx/gitlab_error.log which complains

2014/04/27 17:25:21 [crit] 14331#0: *19 open() 
"/usr/local/var/run/nginx/proxy_temp/3/00/0000000003" failed (13: Permission denied)
while reading upstream, client: 123.113.33.131, server: *, request:
"POST /gamil/gamil.git/git-upload-pack HTTP/1.1", 
upstream: "http://unix:/Users/git/gitlab/tmp/sockets/gitlab.socket:/gamil/gamil.git/git-upload-pack", host: "*"

访问权限为的目录/usr/local/var

drwx------    8 dongli  admin    272  4  1 14:55 var

所以我改成

drwxr-x---    8 dongli  admin    272  4  1 14:55 var

然后错误终于消失了.

这篇关于错误:git-upload-pack 死于信号 13的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆